Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @whitneyit/series with all npm packages installed. Try it out:

var series = require("@whitneyit/series")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@whitneyit/series v1.1.2

Run gulp tasks in series


Run gulp tasks in series.


This package is scoped and requires npm 2.0.0 or above.

You can install series using npm.

$ npm install --save-dev @whitneyit/series

Getting started

First, read the official guide on running tasks in series. If this still does not address your use case then this package may be able to help.

Some good use cases for this plugin are if you are spinning up multiple instances of phantomjs or some other potentially memory intensive task. If this doesn't sound like what you're doing then this package is probably not for you.

Once installed, create a gulpfile.js and define some tasks.

// gulpfile.js

var gulp   = require('gulp');
var casper = require('gulp-casperjs');
var karma  = require('karma').serve;
var series = require('@whitneyit/series')(gulp);

gulp.task('test:unit', function (done) {
        configFile: __dirname + '/karma.conf.js',
        singleRun: true
    }, done);

gulp.task('test:ui', function () {

gulp.task('test', series(['test:unit', 'test:ui']));

By structuring the gulpfile.js like this it allows you to call each child task without having to have the tasks depend on each other.

If you made the test:ui task depend upon the test:unit task, every time you ran gulp test:ui you will run your unit tests as well. This package alleviates that annoyance.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free