forked from tomhalley/es6-websockets-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
41 lines (33 loc) · 1017 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
40
41
var gulp = require('gulp'),
concat = require("gulp-concat"),
sass = require('gulp-sass'),
livereload = require("gulp-livereload");
var jsFiles = ["./src/client/js/**/*.js", "./src/shared/**/*.js"],
jsFilesDest = "./app/js/";
var sassFiles = "./src/client/sass/**/_*.scss",
sassFilesDest = "./app/css/";
gulp.task("build:css", function() {
return gulp.src(sassFiles)
.pipe(concat("main.css"))
.pipe(sass())
.pipe(gulp.dest(sassFilesDest));
});
gulp.task("build:js", function() {
return gulp.src(jsFiles)
.pipe(concat("main.js"))
.pipe(gulp.dest(jsFilesDest));
});
gulp.task("build", function() {
gulp.start("build:js", "build:css")
.pipe(livereload());
});
gulp.task("watch:js", function() {
return gulp.watch(jsFiles, ["build:js"])
});
gulp.task("watch:css", function() {
return gulp.watch(sassFiles, ["build:css"])
});
gulp.task("watch", function() {
livereload.listen();
gulp.start("watch:js", "watch:css");
});