-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (32 loc) · 1013 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
39
const gulp = require("gulp"),
babel = require("gulp-babel"),
stylus = require("gulp-stylus"),
del = require("del")
gulp.task("clean", function () {
return del(["dist"])
})
gulp.task("styles", function () {
return gulp.src("src/*.styl")
.pipe(stylus())
.pipe(gulp.dest("dist"))
})
gulp.task("scripts", function () {
return gulp.src("src/*.js")
.pipe(babel())
.pipe(gulp.dest("dist"))
})
gulp.task("copy", function () {
return gulp.src(["src/manifest.json", "src/*.html"])
.pipe(gulp.dest("dist"))
})
gulp.task("resources", function () {
return gulp.src("src/resources/**/*")
.pipe(gulp.dest("dist/resources"))
})
gulp.task("watch", function () {
gulp.watch("src/*.styl", ["styles"])
gulp.watch("src/*.js", ["scripts"])
gulp.watch(["src/manifest.json", "src/*.html"], ["copy"])
gulp.watch("src/resources/**/*", ["resources"])
})
gulp.task("default", ["clean", "styles", "scripts", "copy", "resources", "watch"])