gulp-space
v1.0.1
Published
Group your Gulp tasks via colon-delimited namespaces
Downloads
3
Maintainers
Readme
Gulp Space
Group your Gulp tasks via colon-delimited namespaces.
Compatible with Gulp 3 & 4.
Getting Started
npm i gulp-space -D
Examples
Gulp 4
var gulp = require('gulp'),
gulpSpace = require('gulp-space'),
getTaskNamesInNamespace = gulpSpace(gulp)
gulp.task('build:styl:convert', function () {
var CSS_DEST = './web-app/css';
var SRC_ROOT = '.';
return gulp.src('./web-app/styl/foo/foo.styl')
.pipe(stylus({use: [nib()]}))
.pipe(gulp.dest(path.join(SRC_ROOT,CSS_DEST)));
});
gulp.task('build:clean:styl', function(){
return gulp.src(['./web-app/styl/stats/*.styl', './web-app/css/foo.css'], {
read: false,
allowEmpty: true
})
.pipe(grimraf());
});
gulp.task('build', gulp.parallel(getTaskNamesInNamespace('build')));
Gulp 3
var gulp = require('gulp'),
gulpSpace = require('gulp-space'),
getTaskNamesInNamespace = gulpSpace(gulp)
gulp.task('build:styl:convert', function () {
var CSS_DEST = './web-app/css';
var SRC_ROOT = '.';
return gulp.src('./web-app/styl/foo/foo.styl')
.pipe(stylus({use: [nib()]}))
.pipe(gulp.dest(path.join(SRC_ROOT,CSS_DEST)));
});
gulp.task('build:clean:styl', function(){
return gulp.src(['./web-app/styl/stats/*.styl', './web-app/css/foo.css'], {
read: false,
allowEmpty: true
})
.pipe(grimraf());
});
gulp.task('build', getTaskNamesInNamespace('build'));