-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
37 lines (29 loc) · 826 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
var gulp = require('gulp');
var runSequence = require('run-sequence'); // run tasks in sequence
var del = require('del');
var uglify = require('gulp-uglify');
var gutil = require('gulp-util');
var concat = require('gulp-concat');
var config = {
paths: {
dist: './public/dist',
dist_js: './public/dist/js',
build: './public/build',
js: './public/js/*.js',
public: './public/js/'
}
};
gulp.task('clean', function () {
return del(config.paths.dist);
});
gulp.task('uglify', function () {
return gulp.src(config.paths.js)
.pipe(uglify())
.pipe(gulp.dest(config.paths.dist_js));
});
gulp.watch(config.paths.js, ['default']);
gulp.task('default', function() {
//return runSequence('clean', 'browserify', 'js', 'clean_builds');
return runSequence('clean', 'uglify');
});