Name: grunt-npm-bower
Owner: Wire Swiss GmbH
Description: Grunt plugin which helps migrating from Bower to npm.
Created: 2017-10-28 20:19:32.0
Updated: 2018-02-20 05:25:49.0
Pushed: 2018-04-17 05:22:08.0
Homepage: https://www.npmjs.com/package/grunt-npm-bower
Size: 212
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.
You can find the published source code at github.com/wireapp.
For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.
Grunt plugin which helps migrating from Bower to npm.
install --save-dev grunt-npm-bower
avascript
t.loadNpmTasks('grunt-npm-bower');
Using grunt-npm-bower is as simple as this:
bower.json
yet!).Gruntfile.js
)bower.json
(?)An exemplary task configuration:
Gruntfile.js
le.exports = grunt => {
unt.initConfig({
npmBower: {
options: {
cleanTargetDir: true,
targetDir: './lib',
verbose: true,
}
;
unt.loadNpmTasks('grunt-npm-bower');
unt.registerTask('default', ['npmBower']);
bowerConfig
String
bower.json
Location of your Bower configuration (relative to your project's root directory).
componentDir
String
node_modules
Location where your Bower components are installed. When using bower install
this will be bower_components
. If you are using npm install
(or yarn
), it's node_modules
. If you are using a .bowerrc file, it might be something else.
npmConfig
String
package.json
Location of your npm configuration (relative to your project's root directory).
cleanTargetDir
Boolean
false
If setted to true
, the specified targetDir
will be removed before copying Bower components there.
overrideProp
String
exportsOverride
Key name that is being used for export overrides (if defined). Read more about exportsOverride
in “Advanced usage“.
resolveName
Boolean
true
If setted to true
, the plugin tries to resolve the names of your dependencies from a bower.json
, .bower.json
or package.json
file (in this order). If setted to false
, it resolves the names from your package.json
(Example: @bower_components/dexie
).