generator-web-starter-grunt
A grunt yeoman sub-generator for web-starter
Last updated 2 years ago by f1builder .
GPL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install generator-web-starter-grunt 
SYNC missed versions from official npm registry.

generator-web-starter-grunt

Allows other yeoman generators to add grunt tasks.

Usage

Grunt task

In the 'configuring' yeoman generator context:

if (typeof this.options.getPlugin === "function" && this.options.getPlugin('grunt')) {
  var editor = this.options.getPlugin('grunt').getGruntTask('postcss');
  editorinsertConfig('postcss.theme', '{ src : "build/css/*.css" }');
  editor.loadNpmTasks('grunt-contrib-postcss');
}

will output in the 'tasks/config/postcss.js'

  ...
  grunt.loadNpmTasks('grunt-postcss');
  grunt.config.merge({
    postcss: {
      'theme1': { 'src': 'build/css/*.css' },
  ...

All other functions available on the Gruntfile Editor can be used as well.

You also need to ensure that the appropriate package has been added to the project.

Adding NPM package

if (typeof this.options.addDevDependency === "function" && this.options.getPlugin('grunt')) {
  this.options.addDevDependency('grunt-postcss', '^0.8.0');
}

will output in 'package.json'

  ...
  "devDependencies":
    ...
    "grunt-postcss": "^0.8.0"
    ...

Note: this functionality is provided by main Yeoman generator

Current Tags

  • 0.2.0                                ...           latest (2 years ago)

6 Versions

  • 0.2.0                                ...           2 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 9
Dependencies (6)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |