css(paths)
Concatenate CSS files from paths.css
into paths.build
/css/style.min.css
.
The concatenation procedure for --production
:
- Concatenate CSS
- Auto-prefixes styles
- Minifies compiled styles
The compilation procedure for non --production
:
- Concatenate CSS
- Builds source maps
The task should run after less
/sass
has finished, if the output from them is included in the css task.
var paths = {
css: [
'node_modules/animate.css/animate.css',
'build/stylesheets/main.css' // this is the output from LESS/SASS
],
...
build: 'build/'
};
var gulp = require('gulp');
var taskMethods = require('gulpfile-ninecms');
var tasks = {
less: function () { return taskMethods.less(paths); }
sass: function () { return taskMethods.sass(paths); }
css: function () { return taskMethods.css(paths); }
};
gulp.task('less', [], tasks.less);
gulp.task('sass', [], tasks.sass);
gulp.task('css', ['less', 'sass'], tasks.css);