Synchronize version of JSON setting file with Grunt task.
Synchronize version of JSON setting files with Grunt task.
module.exports = function (grunt) {
grunt.initConfig({
version: {
options: {
base: 'base.json'
},
files: ['package.json']
}
});
// load grunt-sync-version
grunt.loadNpmTasks('grunt-sync-version');
// register task
grunt.registerTask('default', 'version');
};
Type String
or Array
Specify targets to apply version.
Type: String
Base json file. This is optional.
If base
is omitted, package.json
will be loaded.
Type: Number
MIT.