Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A collection of common grunt tasks.

branch: master
README.md

grunt-contrib (currently in alpha)

A collection of general use grunt tasks. All tasks are designed with cross platform support in mind and dependencies that can easily be managed through npm.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-contrib

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-contrib');

Included Tasks

clean

Clear files and folders.

coffee

Compile CoffeeScript files into JavaScript.

compress

Compress files and folders using gzip or zip.

copy

Copy files into another directory.

handlebars

Compile handlebars templates to JST file.

jade

Compile Jade templates to HTML.

jst

Compile underscore templates to JST file.

less

Compile LESS files to CSS.

mincss

Minify CSS files.

requirejs

Optimize RequireJS projects using r.js.

stylus

Compile Stylus files into CSS.

yuidoc

Compile YUIDoc Documentation.

Included Helpers

options

Unified options retrieval

Bugs

Help us squash them by submitting an issue that describes how you encountered it; please be as specific as possible including operating system, node, grunt, and grunt-contrib versions.

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Also, add tests for any new or changed functionality and be sure to lint your code.

Configuration

In order to ensure a consistent configuration style, task submissions should retreive their optional parameters with the included grunt helper, options.

Testing

New tasks can be added to the config in test/grunt.js, please see existing tests for guidance. Currently, testing with grunt is a bit cumbersome--this will be addressed in a future release.

Running Tests

npm install grunt -g
npm install
npm test

Release History

  • (Until v1.0.0, this will only be updated when major or breaking changes are made)*

  • 2012/06/28 - v0.0.9 - Cleanup release with copy task addition (thanks @ctalkington!)

  • 2012/06/12 - v0.0.7 - Add RequireJS task.
  • 2012/06/03 - v0.0.5 - Cleanup release with zip task addition.
  • 2012/05/01 - v0.0.1 - Alpha release.

License

Copyright (c) 2012 "Cowboy" Ben Alman & contributors. Licensed under the MIT license.

Something went wrong with that request. Please try again.