-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (35 loc) · 1.1 KB
/
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
39
40
41
"use strict";
var gulp = require("gulp"),
minifyJs = require("gulp-uglify"),
minifyCss = require("gulp-minify-css"),
jshint = require("gulp-jshint"),
stylish = require("jshint-stylish"),
rename = require("gulp-rename");
gulp.task("jsHint", function () {
return gulp.src("js/jqk-slider/jquery.jqk-slider.js")
.pipe(jshint())
.pipe(jshint.reporter(stylish))
});
gulp.task("minifyJs", ["jsHint"], function () {
return gulp.src("js/jqk-slider/jquery.jqk-slider.js")
.pipe(minifyJs())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest("dist"));
});
gulp.task("minifyCss", function () {
return gulp.src("css/jqk-slider/jqk-slider.css")
.pipe(minifyCss())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest("dist"))
});
gulp.task("watch", function () {
gulp.watch("css/jqk-slider/jqk-slider.css", ["minifyCss"]);
gulp.watch("js/jqk-slider/jquery.jqk-slider.js", ["minifyJs"]);
});
gulp.task("default", ["minifyJs", "minifyCss", "watch"], function (e) {
console.log("running...");
});