diff --git a/index.js b/index.js index 0c20e25..a7af5ba 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,16 @@ module.exports = function (gulp, processArgv, callbackName) { retrieveArguments )(task); }; - return gulp.task.call(gulp, taskName, taskDependencies || [], wrappedTaskFunction); + + var wrappedFunctionWithDependencies = (function (taskDependencies, wrappedTaskFunction) { + if (Array.isArray(taskDependencies)) { + return gulp.series(taskDependencies, wrappedTaskFunction); + } else { + return wrappedTaskFunction; + } + })(taskDependencies, wrappedTaskFunction); + + return gulp.task.call(gulp, taskName, wrappedFunctionWithDependencies); }; return R.merge(R.clone(gulp), {task: wrappedTask}); }; diff --git a/package.json b/package.json index 560f750..eb2d061 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "devDependencies": { "chai": "^3.4.1", "codecov": "^1.0.1", - "gulp": "^3.9.0", + "gulp": "^4.0.2", "gulp-uglify": "^2.0.0", "istanbul": "^0.4.2", "mocha": "^3.2.0",