0.1.5 • Published 8 years ago

grunt-cmd-extract v0.1.5

Weekly downloads
1
License
-
Repository
github
Last release
8 years ago

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.

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago