0.4.2 • Published 10 years ago

grunt-create-module v0.4.2

Weekly downloads
30
License
-
Repository
-
Last release
10 years ago

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)

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago