-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgulpfile.js
More file actions
39 lines (29 loc) · 796 Bytes
/
gulpfile.js
File metadata and controls
39 lines (29 loc) · 796 Bytes
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
38
39
var gulp = require('gulp');
var gutil = require('gulp-util');
var uglify = require('gulp-uglify');
var jshint = require('gulp-jshint');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');
// jshint
// ---------------------
gulp.task('jshint', function() {
gulp
.src('fluent-time.js')
.pipe(plumber())
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
// scripts
// ----------------------
gulp.task('scripts', function() {
gulp
.src('fluent-time.js')
.pipe(plumber())
.pipe(uglify())
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('./'));
});
gulp.task('watch', function() {
gulp.watch('fluent-time.js', ['jshint', 'scripts']);
});
gulp.task('default', ['jshint', 'scripts', 'watch']);