Grunt plugin that copies info from package.json to bower.json
JavaScript
Pull request Compare This branch is 43 commits ahead, 3 commits behind jonschlinkert:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tasks
.gitignore
.npmrc
.travis.yml
Gruntfile.js
History.md
LICENSE-MIT
README.md
package.json

README.md

grunt-npm2bower-sync

Syncs specified properties from package.json to bower.json

NPM info

Build status dependencies devdependencies endorse

npm install grunt-npm2bower-sync --save-dev

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

grunt.initConfig({
  sync: {
    all: {
      options: {
        // sync specific options
        sync: ['author', 'name', 'version', 'private'],
        // optional: override package values
        overrides: {
            main: [
                '<%= pkg.codename %>.js',
                '<%= pkg.codename %>.css'
            ]
        },
        // optional: specify source and destination filenames
        from: '../package.json',
        to: 'dist/bower.json'
      }
    }
  }
  grunt.loadNpmTasks('grunt-npm2bower-sync');
  grunt.registerTask('default', ['sync']);
});

You can also sync properties from the command line using command grunt sync

If you need just the default properties synced, you can use task sync without options

grunt.initConfig({
  grunt.loadNpmTasks('grunt-npm2bower-sync');
  grunt.registerTask('default', ['sync']);
});

License

This repo was forked from grunt-sync-pkg by Jon Schlinkert.

Copyright (c) 2013-09-09 Jon Schlinkert Licensed under the MIT LICENSE.