First, Install gulp
and gulp-concat
plugin to your project localy
npm install --save-dev gulp gulp-concat
and add gulp-concat task to your gulpfile.js
var gulp = require('gulp');
var concat = require('gulp-concat');
gulp.task('default', function() {
});
gulp.task('css', function() {
return gulp.src('css/*.css')
.pipe(concat('concat.css'))
.pipe(gulp.dest('css/dist'));
});
gulp.task('default', ['css']);
After starting gulp
command, plugin gulp-concat will take all the CSS files located in the css/
directory and concatenate them into a one file css/dist/concat.css