fix(core): update
This commit is contained in:
parent
1008c3f103
commit
5792a13b01
19
.gitignore
vendored
19
.gitignore
vendored
@ -1,5 +1,22 @@
|
||||
node_modules/
|
||||
.nogit/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
|
||||
# custom
|
@ -1,10 +1,10 @@
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
# gitzone ci_default
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
key: '$CI_BUILD_STAGE'
|
||||
|
||||
stages:
|
||||
- security
|
||||
@ -20,17 +20,19 @@ mirror:
|
||||
script:
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
snyk:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:snyk
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install -g snyk
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
@ -38,19 +40,7 @@ snyk:
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testLTS:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install lts
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
testSTABLE:
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
@ -59,6 +49,20 @@ testSTABLE:
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
@ -70,6 +74,7 @@ release:
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
@ -78,20 +83,14 @@ release:
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
image: docker:stable
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
||||
- docker run
|
||||
--env SOURCE_CODE="$PWD"
|
||||
--volume "$PWD":/code
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
|
||||
artifacts:
|
||||
paths: [codeclimate.json]
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
@ -102,18 +101,20 @@ trigger:
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci command npm install -g typedoc typescript
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
|
62
README.md
62
README.md
@ -1,62 +0,0 @@
|
||||
# gulp-function
|
||||
|
||||
accepts a function call as parameter to execute in gulp pipeline
|
||||
|
||||
## Availabililty
|
||||
|
||||
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/gulp-function)
|
||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/gulp-function)
|
||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/gulp-function)
|
||||
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/gulp-function/)
|
||||
|
||||
## Status for master
|
||||
|
||||
[![build status](https://GitLab.com/pushrocks/gulp-function/badges/master/build.svg)](https://GitLab.com/pushrocks/gulp-function/commits/master)
|
||||
[![coverage report](https://GitLab.com/pushrocks/gulp-function/badges/master/coverage.svg)](https://GitLab.com/pushrocks/gulp-function/commits/master)
|
||||
[![npm downloads per month](https://img.shields.io/npm/dm/gulp-function.svg)](https://www.npmjs.com/package/gulp-function)
|
||||
[![Dependency Status](https://david-dm.org/pushrocks/gulp-function.svg)](https://david-dm.org/pushrocks/gulp-function)
|
||||
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
||||
[![Known Vulnerabilities](https://snyk.io/test/npm/{name}/badge.svg)](https://snyk.io/test/npm/@pushrocks/gulp-function)
|
||||
|
||||
### Usage
|
||||
|
||||
```typescript
|
||||
import gulp = require('gulp');
|
||||
import gulpFunction from 'gulp-function'; // default ES6 export
|
||||
// import {forFirst, forEach, atEnd} from 'gulp-function'
|
||||
|
||||
let myAsyncFunction = async (file, enc) => {
|
||||
// await some async stuff
|
||||
};
|
||||
|
||||
gulp.task('gulpTest', function() {
|
||||
let stream = gulp
|
||||
.src('./mydir/*.something')
|
||||
.pipe(gulpFunction(myAsyncFunction, 'forEach')) //read the notes below
|
||||
// .pipe(forEach(myAsyncFunction)) // if imported as >> import { forEach } from 'gulp-function' <<
|
||||
.pipe(gulp.dest('./build/'));
|
||||
return stream; // by returning the stream gulp knows when our task has finished.
|
||||
});
|
||||
```
|
||||
|
||||
### 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.
|
||||
When providing an array of functions be careful with modifying the file object -> race condition
|
||||
- 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**!!!
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
@ -5,6 +5,15 @@
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
|
||||
},
|
||||
"gitzone": {
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitrepo": "gulp-function",
|
||||
"shortDescription": "accepts a function call as parameter to execute in gulp pipeline",
|
||||
"npmPackagename": "@pushrocks/gulp-function",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
4415
package-lock.json
generated
4415
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
@ -26,17 +26,28 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/gulp-function",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartpromise": "^2.0.5",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@types/through2": "^2.0.32",
|
||||
"through2": "^3.0.0"
|
||||
"through2": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.3",
|
||||
"@gitzone/tstest": "^1.0.18",
|
||||
"@pushrocks/smartgulp": "^2.0.1",
|
||||
"@pushrocks/tapbundle": "^3.0.7",
|
||||
"gulp": "^3.9.1",
|
||||
"tslint": "^5.11.0",
|
||||
"tslint-config-prettier": "^1.17.0"
|
||||
}
|
||||
"@gitzone/tsbuild": "^2.1.17",
|
||||
"@gitzone/tstest": "^1.0.28",
|
||||
"@pushrocks/smartgulp": "^2.0.2",
|
||||
"@pushrocks/tapbundle": "^3.2.0",
|
||||
"gulp": "^4.0.2",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_web/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user