Compare commits

...

21 Commits

Author SHA1 Message Date
b037dc99df 1.3.4 2016-06-04 01:22:26 +02:00
27439d84cd fix missing dependency 2016-06-04 01:22:20 +02:00
ada13619d0 1.3.3 2016-06-04 01:15:54 +02:00
9ae1a40260 add gitlab ci 2016-06-04 01:15:48 +02:00
e19184e29b 1.3.2 2016-06-04 01:14:30 +02:00
36e02502d0 update dependencies 2016-06-04 01:14:25 +02:00
75219a5474 1.3.1 2016-04-07 13:56:23 +02:00
8f0ecb3f4a added beautylog back as dev dependency 2016-04-07 13:56:09 +02:00
ec18663137 1.3.0 2016-04-07 13:50:12 +02:00
a476cf8c99 fixed package.json 2016-04-07 13:50:00 +02:00
5af3185742 1.2.5 2016-04-05 00:59:22 +02:00
81849dc5eb updated deps 2016-04-05 00:59:21 +02:00
51b9088d3e 1.2.4 2016-04-05 00:27:13 +02:00
375b43a11c update deps 2016-04-05 00:27:08 +02:00
5b0a1edaa4 1.2.3 2016-04-04 22:55:10 +02:00
855e9b48c8 update deps 2016-04-04 22:55:06 +02:00
99db113285 1.2.2 2016-04-04 22:43:38 +02:00
844812311e fix Readme issue 2016-04-04 22:43:26 +02:00
555c696a8e 1.2.1 2016-04-04 22:39:24 +02:00
879248f049 update deps and update coverage badge to use codecov.io 2016-04-04 22:39:18 +02:00
bb607eca9b fixes #3 and removes beautylog dependency 2016-04-04 22:32:30 +02:00
14 changed files with 90 additions and 38 deletions

37
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,37 @@
image: hosttoday/ht-docker-node:latest
stages:
- test
- release
- page
testLEGACY:
stage: test
script:
- npmci test legacy
tags:
- docker
testLTS:
stage: test
script:
- npmci test lts
tags:
- docker
testSTABLE:
stage: test
script:
- npmci test stable
tags:
- docker
release:
stage: release
script:
- npmci publish npm
- npmci trigger
only:
- tags
tags:
- docker

View File

@ -1,3 +1,5 @@
ts/
test/
docs/
coverage/
node_modules/

View File

@ -6,7 +6,7 @@ accepts call to execute in gulp pipeline.
[![Dependency Status](https://david-dm.org/pushrocks/gulp-function.svg)](https://david-dm.org/pushrocks/gulp-function)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/gulp-function/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/gulp-function/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/gulp-function/badges/code.svg)](https://www.bithound.io/github/pushrocks/gulp-function)
[![Coverage Status](https://coveralls.io/repos/github/pushrocks/gulp-function/badge.svg?branch=master)](https://coveralls.io/github/pushrocks/gulp-function?branch=master)
[![codecov.io](https://codecov.io/github/pushrocks/gulp-function/coverage.svg?branch=master)](https://codecov.io/github/pushrocks/gulp-function?branch=master)
### Version
[![GitHub version](https://badge.fury.io/gh/pushrocks%2Fgulp-function.svg)](https://badge.fury.io/gh/pushrocks%2Fgulp-function)
@ -38,6 +38,14 @@ gulp.task('gulpTest',function() {
});
```
> Note: The first argument of gulpFunction can also be an array of multiple functionnames.
Each function can return a promise. the pipe stop will finish when every promise is fullfilled.
> Note: the second argument can be empty, "forEach" (default), "forFirst" or "atEnd";
### Notes:
* The first argument of gulpFunction can also be an **array of multiple functionnames**.
Each function can return a promise. The pipe stop will finish when every promise is fullfilled.
* The second argument can be empty, it defaults to "forEach"
* The following options are available:
* "forFirst" - executes when first chunk/vinylfile of the stream reaches the pipestop.
file is pushed further down the line when function's returned promise is fullfilled.
* "forEach" - executes like "forFirst" but with every chunk/vinylfile in the stream;
* "atEnd" - executes after all chunks have passed and are processed in full.
That means the stream's "finish" event fires **before "atLast" is executed**!!!

3
dist/gulpfunction.plugins.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
import "typings-global";
export declare let Q: any;
export declare let through2: any;

6
dist/gulpfunction.plugins.js vendored Normal file
View File

@ -0,0 +1,6 @@
"use strict";
require("typings-global");
exports.Q = require("q");
exports.through2 = require("through2");
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImd1bHBmdW5jdGlvbi5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFFYixTQUFDLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2pCLGdCQUFRLEdBQUcsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDIiwiZmlsZSI6Imd1bHBmdW5jdGlvbi5wbHVnaW5zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcclxuXHJcbmV4cG9ydCBsZXQgUSA9IHJlcXVpcmUoXCJxXCIpO1xyXG5leHBvcnQgbGV0IHRocm91Z2gyID0gcmVxdWlyZShcInRocm91Z2gyXCIpO1xyXG4iXX0=

1
dist/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
import "typings-global";

15
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,9 @@
{
"name": "gulp-function",
"version": "1.2.0",
"version": "1.3.4",
"description": "accepts a function call as parameter to execute in gulp pipeline",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {
"test": "(npmts)",
"reinstall": "(rm -r node_modules && npm install)",
@ -11,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/pushrocks/gulp-function.git"
"url": "https://gitlab.com/pushrocks/gulp-function.git"
},
"keywords": [
"gulpplugin",
@ -21,16 +22,18 @@
"author": "Lossless GmbH <office@lossless.com> (https://lossless.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/pushrocks/gulp-function/issues"
"url": "https://gitlab.com/pushrocks/gulp-function/issues"
},
"homepage": "https://github.com/pushrocks/gulp-function",
"homepage": "https://gitlab.com/pushrocks/gulp-function",
"dependencies": {
"beautylog": "^3.1.2",
"q": "^1.4.1",
"through2": "^2.0.1"
"through2": "^2.0.1",
"typings-global": "^1.0.3"
},
"devDependencies": {
"beautylog": "^5.0.8",
"gulp": "^3.9.1",
"npmts": "^3.6.4"
"npmts": "^5.2.1",
"typings-test": "^1.0.1"
}
}

1
test/test.d.ts vendored Normal file
View File

@ -0,0 +1 @@
import "typings-test";

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/// <reference path="../ts/typings/main.d.ts" />
import "typings-test"
var gulp = require("gulp");
var gulpFunction = require("../dist/index.js");
var beautylog = require("beautylog");

View File

@ -0,0 +1,4 @@
import "typings-global";
export let Q = require("q");
export let through2 = require("through2");

View File

@ -1,10 +1,6 @@
/// <reference path="typings/main.d.ts" />
import "typings-global";
var plugins = {
beautylog: require("beautylog"),
Q: require("q"),
through: require("through2")
}
import plugins = require("./gulpfunction.plugins");
@ -29,7 +25,7 @@ module.exports = function (functionsToExecuteArg:any|any[],executionModeArg:stri
runFunction(functionsToExecute[anyFunction]);
}
} else {
plugins.beautylog.error('gulp-callfunction: something is strange with the given arguments');
throw new Error("gulp-callfunction: something is strange with the given arguments");
}
return plugins.Q.all(promiseArray);
};
@ -65,5 +61,5 @@ module.exports = function (functionsToExecuteArg:any|any[],executionModeArg:stri
cb();
}
};
return plugins.through.obj(forEach,atEnd);
return plugins.through2.obj(forEach,atEnd);
};

View File

@ -1,7 +0,0 @@
{
"ambientDependencies": {
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts",
"mocha": "github:Bartvds/tsd-deftools/typings/DefinitelyTyped/mocha/mocha.d.ts",
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts"
}
}