Socket
Book a DemoInstallSign in
Socket

grunt-component-add

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-component-add

Automatically add files to your component.json

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

grunt-component-add

Automatically add files to component.json.

Install

$ npm install grunt-component-add --save-dev

Usage

Example config that modifies component.json when you change files in src/:

module.exports = function (grunt) {
    grunt.initConfig({
        componentadd: {
            add: {
                src: 'src/**/*'
            }
        },
        watch: {
            add: {
                files: 'src/**/*',
                tasks: ['componentadd'],
                options: {
                    nospawn: true,
                    event: ['added', 'deleted'],
                }
            }
        }
    })
    grunt.loadNpmTasks('grunt-contrib-watch')
    grunt.loadNpmTasks('grunt-component-add')
}

Options

Each option, except indent, is an array of file extensions that belong to that type. This plugin checks every matched file for the type it belongs and add it to the corresponding array in component.json. The following are the default values:

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

Keywords

component

FAQs

Package last updated on 01 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts