gulp-flow-css
v2.0.0
Published
CSS, LESS bundle for gulp-flow.
Downloads
1
Maintainers
Readme
gulp-flow-css
CSS, SASS, LESS bundle for gulp-flow.
Requirements
- gulp-flow must be installed.
Install
npm install --save-dev gulp-flow-css
or
yarn add --dev gulp-flow-css
Usage
By default this bundle is preconfigured in cfg.css
.
This module adds some gp
(Gulp plugins):
- gp.postcss
- gp.cssnano
- gp.less
- gp.sass
And pipes
:
- pipes.devSassBundle (NODE_ENV=development)
- pipes.prodSassBundle (NODE_ENV=production)
- pipes.devLessBundle (NODE_ENV=development)
- pipes.prodLessBundle (NODE_ENV=production)
- pipes.devCssBundle (NODE_ENV=development)
- pipes.prodCssBundle (NODE_ENV=production)
And push ignored files in cfg.files
.
See the source code for more details.
Task
A common use case:
'use strict';
require('gulp-flow-css');
// build: CSS
gulp.task('build.css', function() {
return gulp.src(cfg.css.src)
.pipe(gp.newer(cfg.publicCssDir))
// .pipe(gp.using())
.pipe(gp.ifElse(
envList.NODE_ENV === 'production',
pipes.prodCssBundle,
pipes.devCssBundle
))
.pipe(gulp.dest(cfg.publicCssDir))
;
});
And run your tasks: APP_ENV=dev gulp
LICENSE
MIT (c) 2016, Nicolas Tallefourtane.
Author
| | |---| | Nicolas Talle | | |