gulp-component-updater

Gulp-friendly module to auto add/delete files in your component.json

Gulp Component.json Updater

Gulp-friendly module to auto add/delete files in your component.json

In a large project in can be annoying to manually add every new file created to component.json. This module can be used with Gulp to automatically add/remove files from your component.json.

$ npm install component-json-updater --save-dev
var gulp = require('gulp'),
    updater = require('gulp-component-updater')
 
gulp.task('watch', function () {
    gulp.watch(
        ['component.json', 'src/**/*'],
        updater({ log: true })
    )
})

Optional. Defaults to component.json

Optional. Default options:

{
    styles: ['css', 'styl', 'sass', 'less'],
    scripts: ['js', 'coffee'],
    templates: ['html', 'jade', 'mustache', 'handlebars'],
    images: ['jpg', 'png', 'gif'],
    files: [],
    log: false, // console.log file changes 
    indent: 2 // indent spaces in component.json 
}