You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

callback-sequence

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

callback-sequence

Make a new callback to run input callbacks in sequence

1.1.0
Source
npmnpm
Version published
Weekly downloads
116
90.16%
Maintainers
1
Weekly downloads
 
Created
Source

callback-sequence

Make a new callback to run input callbacks in sequence

It is meant to make it easy to construct a gulp task from a sequence of callbacks.

Usage

var sequence = require('callback-sequence');
var Readable = require('stream').Readable;
var gulp = require('gulp');

gulp.task('publish', sequence(
  read, lint, warn, bump
));

function lint() {
}

function warn(cb) {
  process.nextTick(cb);
}

function bump() {
  return Promise.resolve();
}

function read() {
  var s = Readable();
  s.push(null);
  return s;
}

cb = sequence()

Each argument passed in could be a gulp task callback, or an array containing such elements.

sequence will create a callback to run all those specified tasks in appearance order. cb has signature cb(done), and done is called after those tasks finish, with an error object or null.

sequence.run(callbacks, done)

callbacks

Type: Array

An array of gulp task callbacks.

done, if specified, is called after all tasks finish, with an error object or null.

Keywords

gulp

FAQs

Package last updated on 15 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts