-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gulpfile.js
40 lines (35 loc) · 896 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
var gulp = require("gulp"),
autoprefix = require("gulp-autoprefixer"),
sass = require("gulp-sass"),
connect = require("gulp-connect"),
haml = require('gulp-ruby-haml');;
var paths = {
scss: ["./core/**/*.scss",
"./contrib/stylesheets/*.scss"],
haml: './contrib/views/*.haml'
};
gulp.task("sass", function () {
return gulp.src(paths.scss)
.pipe(sass({
includePaths: ["/styles"]
}))
.pipe(autoprefix("last 2 versions"))
.pipe(gulp.dest("./contrib"))
.pipe(connect.reload());
});
gulp.task('haml', function () {
gulp.src(paths.haml)
.pipe(haml())
.pipe(gulp.dest('./contrib'));
});
gulp.task("connect", function() {
connect.server({
root: "contrib",
port: 8000,
livereload: true
});
});
gulp.task("default", ["sass", "haml", "connect"], function() {
gulp.watch(paths.scss, ["sass"]);
gulp.watch(paths.haml, ["haml"]);
});