Compare commits

...

6 Commits

Author SHA1 Message Date
e0c4a10411 0.0.9 2015-11-24 13:51:07 +01:00
6deab0541f update deps 2015-11-24 13:49:02 +01:00
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
ebac042791 0.0.7 2015-10-26 16:22:29 +01:00
6 changed files with 13 additions and 8 deletions

View File

@ -4,6 +4,7 @@ accepts call to execute in gulp pipeline.
### build status/Dependencies
[![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)
[![devDependency Status](https://david-dm.org/pushrocks/gulp-callfunction/dev-status.svg)](https://david-dm.org/pushrocks/gulp-callfunction#info=devDependencies)
### Usage
```javascript

View File

@ -1,7 +1,7 @@
/// <reference path="typings/tsd.d.ts" />
var through = require("through2");
var path = require("path");
var beautylog = require("beautylog");
var beautylog = require("beautylog")("os");
//important vars
var gulpCallFunction = {
executionMode: 'forEach',
@ -32,10 +32,11 @@ var forEach = function (file, enc, cb) {
//tell gulp that we are complete
return cb(null, file);
};
var atEnd = function () {
var atEnd = function (cb) {
if (gulpCallFunction.executionMode == "atEnd") {
runFunctionNames();
}
cb();
};
module.exports = function (functionsToExecute, executionMode, logBool) {
if (executionMode === void 0) { executionMode = 'forEach'; }

View File

@ -1,6 +1,6 @@
{
"name": "gulp-callfunction",
"version": "0.0.6",
"version": "0.0.9",
"description": "accepts a function call as parameter to execute in gulp pipeline",
"main": "index.js",
"scripts": {
@ -29,7 +29,7 @@
"gulp-typescript": "^2.9.2"
},
"dependencies": {
"beautylog": "0.0.15",
"beautylog": "1.0.4",
"through2": "^2.0.0"
}
}

View File

@ -1,8 +1,9 @@
/// <reference path="typings/tsd.d.ts" />
var gulp = require("gulp");
var gulpCallFunction = require("./index.js");
var beautylog = require("beautylog")("os");
var myFunction = function () {
console.log("Hello World!");
beautylog.log("Hello World!");
};
gulp.task('default', function () {
gulp.src('./test/test.md')

View File

@ -1,7 +1,7 @@
/// <reference path="typings/tsd.d.ts" />
var through = require("through2");
var path = require("path");
var beautylog = require("beautylog");
var beautylog = require("beautylog")("os");
//important vars
var gulpCallFunction = {
@ -33,10 +33,11 @@ var forEach = function (file, enc, cb) {
return cb(null, file);
};
var atEnd = function() {
var atEnd = function(cb) {
if (gulpCallFunction.executionMode == "atEnd") {
runFunctionNames();
}
cb();
};
module.exports = function (functionsToExecute:any|any[],executionMode:string = 'forEach', logBool = false) {
gulpCallFunction.functionsToExecute = functionsToExecute;

View File

@ -1,9 +1,10 @@
/// <reference path="typings/tsd.d.ts" />
var gulp = require("gulp");
var gulpCallFunction = require("./index.js");
var beautylog = require("beautylog")("os");
var myFunction = function () {
console.log("Hello World!");
beautylog.log("Hello World!");
}
gulp.task('default',function() {