Last active
June 22, 2016 13:08
-
-
Save Maden-maxi/88a4ee2ea04680a99c50fe03666ac06c to your computer and use it in GitHub Desktop.
function for upload task
This file contains hidden or 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
| function lazyRequireTask(taskName, path, options) { | |
| options = options || {}; | |
| options.taskName = taskName; | |
| gulp.task(taskName, function(callback) { | |
| var task = require(path).call(this, options); | |
| return task(callback); | |
| }); | |
| } | |
| // usage | |
| lazyRequireTask('styles', './tasks/styles', { | |
| src: '../app/styl/style.styl' | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment