2.0.0 • Published 9 years ago

grunt-as-promised v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 years ago

Grunt as promised Build Status

If you wish to be a success in the world, promise everything, deliver nothing. (Napoleon Bonaparte)

Grunt as promised helps you write async custom tasks through promises

Installation

npm install grunt-as-promised --save-dev

Usage

Require grunt-as-promised in your Gruntfile.js:

var gap = require('grunt-as-promised');

Then enhance grunt:

gap.configure(grunt);

Finally use grunt.registerPromiseTask to define tasks as functions returning a promise:

grunt.registerPromiseTask('inline', function () {
  return doSomething().then(function() {
    return doSomethingElse();
  });
};

Examples

var gap = require('grunt-as-promised');

module.exports = function (grunt) {
  gap.configure(grunt);

  grunt.registerPromiseTask('inline', function () {
    // ...
  };
};

More examples are available in examples.

License

MIT

2.0.0

9 years ago

1.0.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago