Mango/gulpfile.js

30 lines
675 B
JavaScript
Raw Normal View History

2020-02-17 01:50:44 +00:00
const gulp = require('gulp');
const minify = require("gulp-babel-minify");
2020-02-17 01:50:44 +00:00
const minifyCss = require('gulp-minify-css');
gulp.task('minify-js', () => {
return gulp.src('public/js/*.js')
2020-02-24 15:45:05 +00:00
.pipe(minify({
removeConsole: true
}))
2020-02-17 01:50:44 +00:00
.pipe(gulp.dest('dist/js'));
});
gulp.task('minify-css', () => {
return gulp.src('public/css/*.css')
.pipe(minifyCss())
.pipe(gulp.dest('dist/css'));
});
2020-02-17 14:53:01 +00:00
gulp.task('img', () => {
return gulp.src('public/img/*')
.pipe(gulp.dest('dist/img'));
});
gulp.task('favicon', () => {
return gulp.src('public/favicon.ico')
.pipe(gulp.dest('dist'));
});
gulp.task('default', gulp.parallel('minify-js', 'minify-css', 'img', 'favicon'));