sync-bower

1.0.1 • Public • Published

sync-bower NPM version NPM monthly downloads NPM total downloads Linux Build Status Windows Build Status

Sync package.json with bower.json.

Install

Install with npm:

$ npm install --save sync-bower

Install with yarn:

$ yarn add sync-bower

API

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.json exists, it will be updated with values in package.json.
  • If bower.json does 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 bower

diff

See a visual diff of proposed changes between package.json and bower.json. Does not modify any files.

$ sync-bower diff

Example output

screen shot 2016-05-13 at 12 50 11 pm

properties

The following fields from package.json are used:

  • name: required
  • description: recommended
  • license: recommended
  • main: recommended
  • ignore: recommended
  • keywords: recommended

These fields are also included, but are considered optional by bower:

  • repository
  • homepage
  • authors
  • dependencies
  • devDependencies

Pull requests or feature requests are welcome!

About

Related projects

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 && verb

Running 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 test

Author

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.

Package Sidebar

Install

npm i sync-bower

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • doowb
  • jonschlinkert