-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
38 lines (33 loc) · 943 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
"use strict";
var gulp = require("gulp"),
browserSync = require("browser-sync"),
sass = require("gulp-sass"),
bourbon = require("node-bourbon").includePaths,
neat = require("node-neat").includePaths,
normalize = require('node-normalize-scss').includePaths;
var reload = browserSync.reload;
// Compiles all gulp tasks
gulp.task("default", ["watch"]);
// Live reload anytime a file changes
gulp.task("watch", ["browserSync", "sass"], function() {
gulp.watch("assets/stylesheets/**/*.scss", ["sass"]);
gulp.watch("*.php").on("change", reload);
});
// Spin up a server
gulp.task("browserSync", function() {
browserSync({
proxy: {
target: "http://mitchcanter.dev",
}
})
});
// Compile SASS files
gulp.task("sass", function() {
gulp.src("assets/stylesheets/**/*.scss")
.pipe(sass({
includePaths: bourbon,
includePaths: neat,
}))
.pipe(gulp.dest("."))
.pipe(browserSync.stream());
});