grunt-create-module

0.4.2 • Public • Published

grunt-create-module

PGAT module generator

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-create-module --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-create-module');

The "createModule" task

Overview

In your project's Gruntfile, add a section named createModule to the data object passed into grunt.initConfig().

grunt.initConfig({
  createModule: {
    options: {
      template: './template'
    }
  },
});

Options

options.template

Type: String

A string value that is used to do something with whatever.

Usage Examples

Grunt task file init:

grunt.initConfig({
  createModule: {
    options: {
      template: './template'
    }
  },
});

Then in shell call the task with --path parameter:

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

Release History

(Nothing yet)

Readme

Keywords

none

Package Sidebar

Install

npm i grunt-create-module

Weekly Downloads

12

Version

0.4.2

License

none

Last publish

Collaborators

  • ivan.zhevakin