forked from fabiospampinato/cash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (31 loc) · 879 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
38
'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
gulp.task('build', function () {
return gulp.src('./src/_wrapper.js')
.pipe($.preprocess())
.pipe($.rename('cash.js'))
.pipe($['6to5']())
.pipe($.size())
.pipe(gulp.dest('./dist/'));
});
gulp.task('minify', ['build'], function() {
return gulp.src(['./dist/cash.js'])
.pipe($.uglify())
.pipe($.size())
.pipe($.rename('cash.min.js'))
.pipe(gulp.dest('./dist/'));
});
gulp.task('lint', function() {
return gulp.src(['src/*.js', '!src/_*.js'])
.pipe($.jshint())
.pipe($.jshint.reporter('default'));
});
gulp.task('test', function() {
return gulp.src('./test/index.html')
.pipe($.qunit());
});
gulp.task('default', ['build', 'minify', 'lint']);
gulp.task('watch', function() {
gulp.watch(['src/*.js', 'test/src/*.js'], ['default']);
});