-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update dependencies, remove gulp-util, as #12
- Loading branch information
Showing
6 changed files
with
25 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.12" | ||
- "4.2" | ||
- "5" | ||
- "4" | ||
- "6" | ||
- "8" | ||
- "9" | ||
sudo: false | ||
cache: | ||
directories: | ||
- node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,40 +7,38 @@ | |
* Licensed under the MIT license. | ||
*/ | ||
|
||
var thunk = require('thunks')() | ||
var gutil = require('gulp-util') | ||
var packageName = require('./package.json').name | ||
var slice = Array.prototype.slice | ||
const thunk = require('thunks').thunk | ||
const slice = Array.prototype.slice | ||
|
||
module.exports = sequence() | ||
|
||
function sequence (gulp) { | ||
function gulpSequence () { | ||
if (!gulp) gulp = require('gulp') | ||
|
||
var BREAKER = {} | ||
var args = slice.call(arguments) | ||
const BREAKER = {} | ||
const args = slice.call(arguments) | ||
var done = args[args.length - 1] | ||
|
||
if (typeof done === 'function') args.pop() | ||
else done = null | ||
|
||
if (!args.length) { | ||
throw new gutil.PluginError(packageName, 'No tasks were provided to gulp-sequence!') | ||
throw new Error('No tasks were provided to gulp-sequence!') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
demurgos
|
||
} | ||
|
||
var runSequence = thunk.seq(args.filter(function (taskName) { | ||
const runSequence = thunk.seq(args.filter(function (taskName) { | ||
// filter falsely taskName | ||
return taskName | ||
}).map(function (task) { | ||
return function (callback) { | ||
if (!Array.isArray(task)) task = [task] | ||
|
||
function successListener (e) { | ||
var index = task.indexOf(e.task) | ||
let index = task.indexOf(e.task) | ||
if (index < 0) return | ||
task[index] = BREAKER | ||
for (var i = 0; i < task.length; i++) { | ||
for (let i = 0; i < task.length; i++) { | ||
if (task[i] !== BREAKER) return | ||
} | ||
removeListener() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It would have been better to replace it with
plugin-error
as indicated ingulp-util
's README. Could you update it?