You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often see modules using gulp which manually define namespaces of sorts in their task names.
gulp.task('build:css', function () {
// do stuff
})
Perhaps a namespace function could be defined, which scopes all add calls, applying the namespace as a prefix.
gulp.namespace('build', function () {
gulp.task('css', function () {
// do stuff
})
})
This example looks a bit verbose, but a nice side-effect is that the namespacing is detached from the task naming, so you can do things like load dependency gulp tasks into your own gulpfile, under a convenient namespace where it won't interfere with other things.
gulp.namespace('some-dependency', function () {
require('some-dependency/gulpfile')
})
The text was updated successfully, but these errors were encountered:
I often see modules using gulp which manually define namespaces of sorts in their task names.
Perhaps a
namespace
function could be defined, which scopes alladd
calls, applying the namespace as a prefix.This example looks a bit verbose, but a nice side-effect is that the namespacing is detached from the task naming, so you can do things like load dependency gulp tasks into your own gulpfile, under a convenient namespace where it won't interfere with other things.
The text was updated successfully, but these errors were encountered: