grunt-sync-pkg

Minimalist Grunt plugin to sync only basic properties between package.json and bower.json

npm install grunt-sync-pkg
10 downloads in the last day
55 downloads in the last week
387 downloads in the last month

grunt-sync-pkg NPM version Build Status

Minimalist Grunt plugin to keep package.json and bower.json synchronized

By default, this plugin syncs the following properties from package.json to bower.json:

  • name
  • version
  • main

Note that if a bower.json file does not exist, the plugin creates on first. There is no option to turn this off, since there is no reason to use the plugin if you aren't syncing with anything :-).

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide.

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:

npm install grunt-sync-pkg --save-dev

Once that's done, add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-sync-pkg');

If the plugin has been installed correctly, you should now be able to run grunt sync at the command line to run the sync task.

Options

include

Type: Array Default: ['name', 'version', 'main']

Properties to sync from package.json to bower.json.

exclude

Type: Array Default: undefined

Properties to exclude from syncing.

alt

Type: Obj Default: undefined

Specify an additional JSON file to sync, such as myplugin.jquery.json.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Author

Jon Schlinkert

Copyright (c) 2013 Jon Schlinkert Released under the MIT License.

npm loves you