Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
e10c31c740 | |||
af68a92702 | |||
a8c3fa048a | |||
bea33fa29f |
@ -1,4 +1,4 @@
|
|||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-node:npmts
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
|
12
README.md
12
README.md
@ -19,12 +19,12 @@ accepts call to execute in gulp pipeline.
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
```javascript
|
```javascript
|
||||||
var gulp = require("gulp");
|
let gulp = require("gulp");
|
||||||
var gulpFunction = require("gulp-function");
|
let gulpFunction = require("gulp-function");
|
||||||
var Q = require("q");
|
let Q = require("q");
|
||||||
|
|
||||||
var myFunction = function (file, enc) { // file and enc are optional in case you want to modify the file object
|
let myFunction = function (file, enc) { // file and enc are optional in case you want to modify the file object
|
||||||
var done = Q.defer();
|
let done = Q.defer();
|
||||||
console.log("Hello World!")
|
console.log("Hello World!")
|
||||||
|
|
||||||
// NOTE:
|
// NOTE:
|
||||||
@ -36,7 +36,7 @@ var myFunction = function (file, enc) { // file and enc are optional in case you
|
|||||||
}
|
}
|
||||||
|
|
||||||
gulp.task('gulpTest',function() {
|
gulp.task('gulpTest',function() {
|
||||||
var stream = gulp.src('./mydir/*.something')
|
let stream = gulp.src('./mydir/*.something')
|
||||||
.pipe(gulpFunction(myFunction,'forEach')) //read the notes below
|
.pipe(gulpFunction(myFunction,'forEach')) //read the notes below
|
||||||
.pipe(gulp.dest("./build/"));
|
.pipe(gulp.dest("./build/"));
|
||||||
return stream; // by returning the stream gulp knows when our task has finished.
|
return stream; // by returning the stream gulp knows when our task has finished.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gulp-function",
|
"name": "gulp-function",
|
||||||
"version": "2.0.0",
|
"version": "2.0.2",
|
||||||
"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": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user