Is there a way to change gulp context inside my gulpfile.js
?
Right now I'm prefixing all my gulp.src
with the location I want. But is there a way to change this globally?
This is the current code I have:
var base = '../';
gulp.task('copy', function() {
gulp.src(base + 'sampleFile.js').pipe(gulp.dest('dist/'));
});
gulp.task('clean', function() {
del.sync([base + options.dist]);
});
This is somehow what I'm looking for:
gulp.base('../', function() {
gulp.task('copy', function() {
gulp.src('sampleFile.js').pipe(gulp.dest('dist/'));
});
gulp.task('clean', function() {
del.sync([options.dist]);
});
});