1.0.0 • Published 6 years ago

gulp-sequence v1.0.0

Weekly downloads
31,064
License
-
Repository
github
Last release
6 years ago

gulp-sequence

Run a series of gulp tasks in order.

NPM version Build Status Downloads

Install

Install with npm

npm install --save-dev gulp-sequence

Usage

var gulp = require('gulp')
var gulpSequence = require('gulp-sequence')

gulp.task('a', function (cb) {
  //... cb()
})

gulp.task('b', function (cb) {
  //... cb()
})

gulp.task('c', function (cb) {
  //... cb()
})

gulp.task('d', function (cb) {
  //... cb()
})

gulp.task('e', function (cb) {
  //... cb()
})

gulp.task('f', function () {
  // return stream
  return gulp.src('*.js')
})

// usage 1, recommend
// 1. run 'a', 'b' in parallel;
// 2. run 'c' after 'a' and 'b';
// 3. run 'd', 'e' in parallel after 'c';
// 3. run 'f' after 'd' and 'e'.
gulp.task('sequence-1', gulpSequence(['a', 'b'], 'c', ['d', 'e'], 'f'))

// usage 2
gulp.task('sequence-2', function (cb) {
  gulpSequence(['a', 'b'], 'c', ['d', 'e'], 'f', cb)
})

// usage 3
gulp.task('sequence-3', function (cb) {
  gulpSequence(['a', 'b'], 'c', ['d', 'e'], 'f')(cb)
})

gulp.task('gulp-sequence', gulpSequence('sequence-1', 'sequence-2', 'sequence-3'))

with gulp.watch:

gulp.watch('src/**/*.js', function (event) {
  gulpSequence('a', 'b')(function (err) {
    if (err) console.log(err)
  })
})

API

var gulpSequence = require('gulp-sequence')

gulpSequence('subtask1', 'subtask2',..., callback)

return a thunk function.

var gulp = require('gulp')
var gulpSequence = require('gulp-sequence')

gulp.task('test', gulpSequence(['a', 'b'], 'c', ['d', 'e'], 'f'))

gulpSequence.use(gulp)

return a new gulpSequence function with the gulp. If you have some errors such as "task xxx is not defined", this will resolve it.

var gulp = require('gulp')
var gulpSequence = require('gulp-sequence').use(gulp)

gulp.task('test', gulpSequence(['a', 'b'], 'c', ['d', 'e'], 'f'))

License

MIT © Teambition

gulpproject-v1bm_scaffold_async_router_test@satche/workflowjk-component-toolsjoyertools-packvue2-scaffoldcocospack@infinitebrahmanuniverse/nolb-gulp-s@amerkiven/parisaline@everything-registry/sub-chunk-1811@edjboston/eslint-rules@linzebingo/pokeball-cli-service@marknotton/gulp-taskshw-javascript-sdkhygge-kit@nhz.io/slush-jwt-auth-proxy-conf@nitrooo/exporter@nitrooo/gulp@eoskunkworks/understrap@essex/pbi-base@gcrda/gulp-task@gdkf/cli-theme@nurun-sf/spark-componentkingBuilderkl-gulp-taskskdui1kduieditor3@solitea/sp-fx-solitea-dms-lib@simpo/gulp-augmentjs-logger-icy@salespreso/deck-gulp-taskslambda_patternjibo-gulpkoa-grace-appkoaVuelxc-gulp-taskmatrix-angular-gulpmeteor-webpackniehues-assetsniehues-assets-dupmp-pluginmp-linternitro-exporternbugs-component-clinbugs-component-tools-testnbugs-design-toolscarrefour-themeblendamedblendidblendid-ftblendmebmfe_scaffold_v2cocos2d-html5-packagerqloan-gulpqloan-gulp-extendedvaccine-pediffpinion-pipelinecapuchinopolyline-extendedcfx.antd-wrappercfx.antd-wrapper-chcfx.react-reduxcfx.react.domcfx.react.linkcfx.react.link.domcfx.react.link.examplecfx.react.stylecfx.redux.actioncfx.redux.reactcfx.redux.reduxcfx.redux.sagascfx.redux.typecfx.registrycfx.servicecfx.service.baseapicfx.service.corecfx.service.requestcloudcannon-suitecreate-react-webcreate-react-web-testcreate-nbugs-mobilecraffftviu-launchpadcopys2@wibetter/gulp-projectmok_ykxmm-app-gulp-buildweex-eros-scaffolddevelo-cliwrappack-clidoomjsrentivo-waypoint-timberww2rmaps-angular-utilswwtocy-bdd-test-02vulcan-uiweb-project-starter
1.0.0

6 years ago

0.4.6

8 years ago

0.4.5

8 years ago

0.4.4

8 years ago

0.4.3

8 years ago

0.4.2

8 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago