-
Notifications
You must be signed in to change notification settings - Fork 13
/
gulpfile.js
executable file
·36 lines (31 loc) · 996 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
/*Load all plugin define in package.json*/
var gulp = require('gulp'),
gulpLoadPlugins = require('gulp-load-plugins'),
plugins = gulpLoadPlugins(),
uglify = require('gulp-uglify-es').default;
/*JS task*/
gulp.task('dist', function () {
gulp.src([ 'assets/js/input-5.js' ])
.pipe(plugins.jshint())
.pipe(uglify())
.pipe(plugins.concat('input-5.min.js'))
.pipe(gulp.dest('assets/js/'));
gulp.src([ 'assets/js/input-56.js' ])
.pipe(plugins.jshint())
.pipe(uglify())
.pipe(plugins.concat('input-56.min.js'))
.pipe(gulp.dest('assets/js/'));
return gulp.src([ 'assets/css/style.css' ])
.pipe(plugins.uglifycss())
.pipe(plugins.concat('style.min.css'))
.pipe(gulp.dest('assets/css/'));
});
gulp.task('check-js', function () {
return gulp.src('assets/js/component.js')
.pipe(plugins.jshint())
.pipe(plugins.jshint.reporter('default'));
});
// On default task, just compile on demand
gulp.task('default', function() {
gulp.watch('assets/js/*.js', [ 'check-js']);
});