Home

Awesome

sync-pkg NPM version NPM downloads Build Status

CLI to sync only basic properties from package.json to bower.json.

Install

Install with npm:

$ npm install sync-pkg --save

API

var sync = require('sync-pkg');

// omit fields using glob patterns
sync(['!description', '!foo*']);

// extend existing bower.json
sync(null, {
  extend: true
});

// allow empty fields
sync(null, {
  empty: true
});

CLI

Run sync-pkg in the command line to create and/or update bower.json.

$ sync-pkg

Commands

bower

Create a bower.json file and/or update the existing bower.json. Equivalent to running sync-pkg without the bower command, except that it will automatically create a bower.json file if one does not exist, and you will not be prompted.

$ sync-pkg bower

diff

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

$ sync-pkg diff

Example output

<img width="669" alt="screen shot 2016-05-13 at 12 50 11 pm" src="https://cloud.githubusercontent.com/assets/383994/15255318/54996aa2-1909-11e6-99a3-90f6129dd7da.png">

properties

The following fields from package.json are used:

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

Pull requests or feature requests are welcome!

Related projects

You might also be interested in these projects:

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install verb && npm run docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb, v0.9.0, on May 13, 2016.