forked from zhouzi/TheaterJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
23 lines (20 loc) · 817 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
var gulp = require("gulp"),
plugins = require("gulp-load-plugins")();
gulp.task("scripts", function () {
gulp
.src("src/theater.js")
.pipe(gulp.dest("build"))
.pipe(plugins.uglify())
.pipe(plugins.rename({ suffix: ".min" }))
.pipe(gulp.dest("build"));
});
gulp.task("styles", function () {
gulp
.src("src/styles.scss")
.pipe(plugins.rubySass({ style: "compressed", "sourcemap=none": true }))
.pipe(plugins.autoprefixer("last 3 version"))
.pipe(gulp.dest("build"));
});
gulp.task("serve", ["default"], function () { gulp.src("").pipe(plugins.webserver()); });
gulp.task("watch", ["default"], function () { gulp.watch("src/**/*.js", ["scripts"]); gulp.watch("src/styles.scss", ["styles"]) });
gulp.task("default", ["scripts", "styles"]);