grunt-npm2bower-sync
Grunt plugin syncing properties from package.json to bower.json
Last updated 5 years ago by bahmutov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install grunt-npm2bower-sync 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.9.1                                ...           latest (5 years ago)

11 Versions

  • 0.9.1                                ...           5 years ago
  • 0.9.0                                ...           5 years ago
  • 0.8.1                                ...           6 years ago
  • 0.8.0                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.0                                ...           6 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.0                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 17
This Month 22
Last Day 0
Last Week 4
Last Month 4
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2014 - 2017 © taobao.org |