sync-bower v1.0.1
sync-bower

Sync package.json with bower.json.
Install
Install with npm:
$ npm install --save sync-bowerInstall with yarn:
$ yarn add sync-bowerAPI
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);
});CLI
Run sync-bower in the command line to update bower.json.
$ sync-bower- If
bower.jsonexists, it will be updated with values in package.json. - If
bower.jsondoes not exist, you will be asked if you want to create one.
Commands
bower
Create a bower.json file and/or update the existing bower.json without prompting you for feedback.
$ sync-bower bowerdiff
See a visual diff of proposed changes between package.json and bower.json. Does not modify any files.
$ sync-bower diffExample output
properties
The following fields from package.json are used:
name: requireddescription: recommendedlicense: recommendedmain: recommendedignore: recommendedkeywords: recommended
These fields are also included, but are considered optional by bower:
repositoryhomepageauthorsdependenciesdevDependencies
Pull requests or feature requests are welcome!
About
Related projects
- gulp-normalize-pkg: Gulp plugin for normalize-pkg. | homepage
- normalize-pkg: Normalize values in package.json using the map-schema library. | homepage
- sync-pkg: CLI to sync only basic properties from package.json to bower.json. | homepage
Contributing
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.
Contributors
| Commits | Contributor |
|---|---|
| 6 | jonschlinkert |
| 1 | doowb |
| 1 | raphinesse |
Building docs
(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 && verbRunning tests
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 testAuthor
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 14, 2017.