grunt-cmd-extract
v0.1.5
Published
Extract ids and dependencies for cmd module
Downloads
5
Maintainers
Readme
grunt-cmd-extract
Extract ids and dependencies for cmd module
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-cmd-extract --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-cmd-extract');
The "cmd_extract" task
Overview
In your project's Gruntfile, add a section named cmd_extract
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
cmd_extract: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Options
options.extractId
Type: Boolean
Default value: false
Whether to extract id for the module.
options.idTemplate
Type: String
Default value: ''
A string value that is used to do make custom id.
options.quote
Type: String
Default value: '
Whether to use single quote or double quote.
options.log
Type: Boolean
Default value: false
Whether to show log after extracted.
Usage Examples
Options
grunt.initConfig({
cmd_extract: {
default: {
options: {
extractId : true,
idTemplate : 'test-{{id}}',
quote : '"',
log : true
},
files:[ {
expand:true,
cwd : 'test/src/',
src : '*.js',
dest : 'test/dist/'
}]
}
},
});
License
This repo is released under the MIT License.