updated structure
This commit is contained in:
parent
e0c4a10411
commit
e42c5004c2
12
index.js
12
index.js
@ -2,12 +2,18 @@
|
||||
var through = require("through2");
|
||||
var path = require("path");
|
||||
var beautylog = require("beautylog")("os");
|
||||
module.exports = function (functionsToExecute, executionMode, logBool) {
|
||||
if (executionMode === void 0) { executionMode = 'forEach'; }
|
||||
if (logBool === void 0) { logBool = false; }
|
||||
//important vars
|
||||
var gulpCallFunction = {
|
||||
executionMode: 'forEach',
|
||||
functionsToExecute: undefined,
|
||||
logBool: false
|
||||
};
|
||||
gulpCallFunction.functionsToExecute = functionsToExecute;
|
||||
gulpCallFunction.executionMode = executionMode;
|
||||
gulpCallFunction.logBool = logBool;
|
||||
var runFunctionNames = function () {
|
||||
if (typeof gulpCallFunction.functionsToExecute == "function") {
|
||||
gulpCallFunction.functionsToExecute();
|
||||
@ -38,11 +44,5 @@ var atEnd = function (cb) {
|
||||
}
|
||||
cb();
|
||||
};
|
||||
module.exports = function (functionsToExecute, executionMode, logBool) {
|
||||
if (executionMode === void 0) { executionMode = 'forEach'; }
|
||||
if (logBool === void 0) { logBool = false; }
|
||||
gulpCallFunction.functionsToExecute = functionsToExecute;
|
||||
gulpCallFunction.executionMode = executionMode;
|
||||
gulpCallFunction.logBool = logBool;
|
||||
return through.obj(forEach, atEnd);
|
||||
};
|
||||
|
12
ts/index.ts
12
ts/index.ts
@ -3,11 +3,13 @@ var through = require("through2");
|
||||
var path = require("path");
|
||||
var beautylog = require("beautylog")("os");
|
||||
|
||||
|
||||
module.exports = function (functionsToExecuteArg:any|any[],executionModeArg:string = 'forEach', logBoolArg = false) {
|
||||
//important vars
|
||||
var gulpCallFunction = {
|
||||
executionMode: 'forEach', //can be forEach or atEnd
|
||||
functionsToExecute: undefined,
|
||||
logBool: false
|
||||
executionMode: executionModeArg, //can be forEach or atEnd
|
||||
functionsToExecute: functionsToExecuteArg,
|
||||
logBool: logBoolArg
|
||||
};
|
||||
|
||||
var runFunctionNames = function () {
|
||||
@ -39,9 +41,5 @@ var atEnd = function(cb) {
|
||||
}
|
||||
cb();
|
||||
};
|
||||
module.exports = function (functionsToExecute:any|any[],executionMode:string = 'forEach', logBool = false) {
|
||||
gulpCallFunction.functionsToExecute = functionsToExecute;
|
||||
gulpCallFunction.executionMode = executionMode;
|
||||
gulpCallFunction.logBool = logBool;
|
||||
return through.obj(forEach,atEnd);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user