0.3.2 • Published 11 years ago

grunt-fail v0.3.2

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

##grunt-fail

Cause grunt to stop execution with an error message and return code of choice, preventing subsequent tasks from running.

###Installation

  1. Change directories to the root directory of your project
  2. npm install grunt
  3. npm install grunt-fail
  4. Add the following line to your Gruntfile.js

    grunt.loadNpmTasks('grunt-fail');

The fail task is now available; for example

grunt fail

###Usage

grunt-fail takes an optional error message and an optional return code as arguments.

For example

grunt "fail:Don't deploy:-26"

If there is just one argument, it can be either a numerical return code, or an error message.

The default message is "Failed on purpose."

The default return code is -1.

More examples

grunt fail:-6
grunt "fail:no thanks"

You can use it in an alias task like this

task('test', ['vows', 'fail:99']);

###Don't set the error code to zero Grunt doesn't consider zero an error, so it won't fail. Don't do it!

###Bugs, etc.

Please report any bugs, feature requests, etc. to grunt-fails's github issue tracker.

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago