Compare commits

..

3 Commits

Author SHA1 Message Date
22e3dc6136 0.0.8 2015-11-24 13:44:38 +01:00
e69e8df875 fix:added callback to function() atEnd 2015-11-24 13:44:32 +01:00
4cb24a4a6d add dev dependency badge 2015-10-26 16:25:08 +01:00
4 changed files with 6 additions and 3 deletions

View File

@ -4,6 +4,7 @@ accepts call to execute in gulp pipeline.
### build status/Dependencies ### build status/Dependencies
[![Build Status](https://travis-ci.org/pushrocks/gulp-callfunction.svg?branch=v0.0.2)](https://travis-ci.org/pushrocks/gulp-callfunction) [![Build Status](https://travis-ci.org/pushrocks/gulp-callfunction.svg?branch=v0.0.2)](https://travis-ci.org/pushrocks/gulp-callfunction)
[![Dependency Status](https://david-dm.org/pushrocks/gulp-callfunction.svg)](https://david-dm.org/pushrocks/gulp-callfunction) [![Dependency Status](https://david-dm.org/pushrocks/gulp-callfunction.svg)](https://david-dm.org/pushrocks/gulp-callfunction)
[![devDependency Status](https://david-dm.org/pushrocks/gulp-callfunction/dev-status.svg)](https://david-dm.org/pushrocks/gulp-callfunction#info=devDependencies)
### Usage ### Usage
```javascript ```javascript

View File

@ -32,10 +32,11 @@ var forEach = function (file, enc, cb) {
//tell gulp that we are complete //tell gulp that we are complete
return cb(null, file); return cb(null, file);
}; };
var atEnd = function () { var atEnd = function (cb) {
if (gulpCallFunction.executionMode == "atEnd") { if (gulpCallFunction.executionMode == "atEnd") {
runFunctionNames(); runFunctionNames();
} }
cb();
}; };
module.exports = function (functionsToExecute, executionMode, logBool) { module.exports = function (functionsToExecute, executionMode, logBool) {
if (executionMode === void 0) { executionMode = 'forEach'; } if (executionMode === void 0) { executionMode = 'forEach'; }

View File

@ -1,6 +1,6 @@
{ {
"name": "gulp-callfunction", "name": "gulp-callfunction",
"version": "0.0.7", "version": "0.0.8",
"description": "accepts a function call as parameter to execute in gulp pipeline", "description": "accepts a function call as parameter to execute in gulp pipeline",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -33,10 +33,11 @@ var forEach = function (file, enc, cb) {
return cb(null, file); return cb(null, file);
}; };
var atEnd = function() { var atEnd = function(cb) {
if (gulpCallFunction.executionMode == "atEnd") { if (gulpCallFunction.executionMode == "atEnd") {
runFunctionNames(); runFunctionNames();
} }
cb();
}; };
module.exports = function (functionsToExecute:any|any[],executionMode:string = 'forEach', logBool = false) { module.exports = function (functionsToExecute:any|any[],executionMode:string = 'forEach', logBool = false) {
gulpCallFunction.functionsToExecute = functionsToExecute; gulpCallFunction.functionsToExecute = functionsToExecute;