Sites:
- www.npmjs.com/package
Tips:
1. compress & concat JS:
- gulp-uglify : compress
- gulp-concat : concat
Example:
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
gulp.task('scripts', function() {
gulp.src('public/js/*.js')
.pipe(concat('dist.js'))
.pipe(uglify())
.pipe(gulp.dest('public/js/dist/'));
});
- gulp-minify-css
- gulp-concat-css
Example:
var gulp = require('gulp');
var concatCss = require('gulp-concat-css');
var minifyCss = require('gulp-minify-css');
gulp.task('styles', function() {
gulp.src(['public/css/b.css','public/css/a.css'])
.pipe(concatCss('dist.css'))
.pipe(minifyCss())
.pipe(gulp.dest('public/dist/'));
});