Add a compress
task to Gulp.
This commit is contained in:
parent
11997131f4
commit
30b4f27e03
@ -9,7 +9,8 @@ var gulp = require('gulp')
|
|||||||
, rimraf = require('gulp-rimraf')
|
, rimraf = require('gulp-rimraf')
|
||||||
, sass = require('gulp-sass')
|
, sass = require('gulp-sass')
|
||||||
, transform = require('vinyl-transform')
|
, transform = require('vinyl-transform')
|
||||||
, uglify = require('gulp-uglify');
|
, uglify = require('gulp-uglify')
|
||||||
|
, zip = require('gulp-zip');
|
||||||
|
|
||||||
gulp.task('lint', function () {
|
gulp.task('lint', function () {
|
||||||
return gulp.src(['./src/**/*.js', './gulpfile.js'])
|
return gulp.src(['./src/**/*.js', './gulpfile.js'])
|
||||||
@ -122,4 +123,10 @@ gulp.task('watch', function () {
|
|||||||
|
|
||||||
gulp.task('serve', ['connect', 'watch']);
|
gulp.task('serve', ['connect', 'watch']);
|
||||||
|
|
||||||
|
gulp.task('compress', function () {
|
||||||
|
return gulp.src('./out/**')
|
||||||
|
.pipe(zip('perfect-scrollbar.zip'))
|
||||||
|
.pipe(gulp.dest('./out'));
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('default', ['lint', 'build']);
|
gulp.task('default', ['lint', 'build']);
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
"gulp-rimraf": "^0.1.1",
|
"gulp-rimraf": "^0.1.1",
|
||||||
"gulp-sass": "^1.3.1",
|
"gulp-sass": "^1.3.1",
|
||||||
"gulp-uglify": "^1.0.2",
|
"gulp-uglify": "^1.0.2",
|
||||||
|
"gulp-zip": "^2.0.2",
|
||||||
"vinyl-transform": "^1.0.0"
|
"vinyl-transform": "^1.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
Reference in New Issue
Block a user