co-grunt

1.0.0 • Public • Published

Build Status

co-grunt

ES6 generator support for grunt. Write async tasks easily w/ 'yield'.

Write asynchronous tasks using generators instead of having to use var done = this.async().

Example

require('co-grunt'); // have to require it so co-grunt can override the default registerTask function.

var request = require('request-promise');

module.exports = function (grunt) {
    grunt.registerTask("goog", function * () {
        var page = yield request('http://google.com');

        console.log("got google?");
        console.log(page);
        console.log("well, now you do!");
    });
};

Package Sidebar

Install

npm i co-grunt

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • diosmosis2