forked from jsmodules/ddslick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
37 lines (31 loc) · 948 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
/* eslint-env node */
var gulp = require("gulp");
var rename = require("gulp-rename");
var uglify = require("gulp-uglify");
var eslint = require("gulp-eslint");
gulp.task("uglify", ["lint:tdd"], function() {
return gulp
.src(__dirname + "/src/jquery.ddslick.js")
.pipe(uglify())
.pipe(rename("jquery.ddslick.min.js"))
.pipe(gulp.dest(__dirname + "/dist"));
});
gulp.task("lint:tdd", function() {
return gulp
.src(__dirname + "/src/jquery.ddslick.js")
.pipe(eslint())
.pipe(eslint.format());
});
gulp.task("lint", function() {
return gulp
.src(__dirname + "/src/jquery.ddslick.js")
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task("watch", function() {
gulp.watch(__dirname + "/src/**/*.js", ["uglify"]);
});
gulp.task("build", ["uglify"]);
gulp.task("test", ["lint"]);
gulp.task("default", ["watch"]);