Sync package.json with bower.json.
Install with npm:
$ npm install --save sync-bower
Install with yarn:
$ yarn add sync-bower
var fs = require('fs');
var sync = require('sync-bower');
var pkg = require('./package.json');
var bower = require('./bower.json');
var updatedBower = sync(pkg, bower);
fs.writeFile('bower.json', updatedBower, function(err) {
if (err) console.log(err);
});
Run sync-bower in the command line to update bower.json.
$ sync-bower
bower.json exists, it will be updated with values in package.json.bower.json does not exist, you will be asked if you want to create one.Create a bower.json file and/or update the existing bower.json without prompting you for feedback.
$ sync-bower bower
See a visual diff of proposed changes between package.json and bower.json. Does not modify any files.
$ sync-bower diff
Example output
The following fields from package.json are used:
name: requireddescription: recommendedlicense: recommendedmain: recommendedignore: recommendedkeywords: recommendedThese fields are also included, but are considered optional by bower:
repositoryhomepageauthorsdependenciesdevDependenciesPull requests or feature requests are welcome!
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
| Commits | Contributor |
|---|---|
| 6 | jonschlinkert |
| 1 | doowb |
| 1 | raphinesse |
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 14, 2017.