npm install grunt-create-module> PGAT module generator
~0.4.5If 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:
``shell`
npm install grunt-create-module --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
`js`
grunt.loadNpmTasks('grunt-create-module');
to the data object passed into grunt.initConfig().`js
grunt.initConfig({
createModule: {
options: {
template: './template'
}
},
});
`$3
#### options.template
Type:
StringA string value that is used to do something with whatever.
$3
Grunt task file init:
`js
grunt.initConfig({
createModule: {
options: {
template: './template'
}
},
});
`Then in shell call the task with
--path parameter:`shell
grunt createModule --path='./path/to/new/module'
`You can use following new module name and path placeholders in directories and files names and in its content:
-
{module-name} - resolves to module name as paramCase
- {moduleName} - resolves to module name as camelCase
- {ModuleName} - resolves to module name as PascalCase
- {module-path}` - resolves to module directory path