Gulp Promises
Ensure reliable callbacks of multiple streams within a task.
Installation
npm install gulp-promise
Simple Usage
var promise = ; // the list of projectvar projectsToBuild = "proj1": true "proj2": true "proj3": true; /** * Build JS */gulp;
API
The constructor can be called plain or with a success callback. Eg:
var myProm = ; // ormyProm = { // Done!};
You can resolve promises manually (myProm.deliverPromise()
) or via gulp streams (myProm.deliverGulpPromise()
).
Breaking Change
In 1.0, this was changed to be a proper class and can no longer be used statically. Also, prom.deliverPromise()
for gulp pipes has been replaced by prom.deliverGulpPromise()
.