gulp-run-sequence
Advanced tools
Comparing version
24
index.js
@@ -8,2 +8,21 @@ /*jshint node:true */ | ||
var verifyTaskSets = function(taskSets, skipArrays) { | ||
taskSets.forEach(function(t, i) { | ||
var isTask = typeof t === "string", | ||
isArray = !skipArrays && Array.isArray(t); | ||
if(!isTask && !isArray) { | ||
throw new Error("Task "+t+" is not a valid task string."); | ||
} | ||
if(isTask && !gulp.hasTask(t)) { | ||
throw new Error("Task "+t+" is not configured as a task on gulp."); | ||
} | ||
if(isArray) { | ||
if(t.length === 0) { | ||
throw new Error("An empty array was provided as a task set"); | ||
} | ||
verifyTaskSets(t, true); | ||
} | ||
}) | ||
} | ||
module.exports = function() { | ||
@@ -47,2 +66,7 @@ var taskSets = Array.prototype.slice.call(arguments), | ||
if(taskSets.length === 0) { | ||
throw new Error('No tasks were provided to gulp-run-sequence'); | ||
} | ||
verifyTaskSets(taskSets); | ||
gulp.on('task_stop', onTaskEnd); | ||
@@ -49,0 +73,0 @@ gulp.on('task_err', onError); |
{ | ||
"name": "gulp-run-sequence", | ||
"description": "Run a series of dependent gulp tasks in order", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"homepage": "https://github.com/OverZealous/gulp-run-sequence", | ||
@@ -16,3 +16,3 @@ "repository": { | ||
"keywords": [ | ||
"gulpplugin" | ||
"gulpplugin", "pipe", "sequence" | ||
], | ||
@@ -23,6 +23,8 @@ "dependencies": { | ||
"devDependencies": { | ||
"gulp": "*", | ||
"mocha": "*", | ||
"should": "*" | ||
}, | ||
"scripts": { | ||
"test": "mocha --reporter spec" | ||
}, | ||
@@ -43,4 +45,4 @@ "engines": { | ||
}, | ||
"_id": "gulp-run-sequence@0.3.0", | ||
"_id": "gulp-run-sequence@0.3.1", | ||
"_from": "gulp-run-sequence@*" | ||
} |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
8663
11.06%7
16.67%67
48.89%3
Infinity%1
Infinity%