-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
43 lines (37 loc) · 813 Bytes
/
gulpfile.js
File metadata and controls
43 lines (37 loc) · 813 Bytes
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
42
43
var gulp = require('gulp');
var haml = require('gulp-haml');
var sass = require('gulp-sass');
var browserSync =require('browser-sync');
gulp.task('haml', function() {
gulp.src('./index.haml')
.pipe(haml())
.pipe(gulp.dest('./'));
});
gulp.task('sass', function() {
gulp.src('./assets/sass/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./assets/css'));
});
gulp.task('browser-sync', function() {
browserSync({
server: {
baseDir: "./",
index : "index.html"
}
});
});
gulp.task('bs-reload', function () {
browserSync.reload();
});
gulp.task('watch', function() {
gulp.watch([
'./index.haml',
'./assets/sass/*.scss'
], [
'haml',
'sass',
'bs-reload'
]);
})
// Default gulp task to run
gulp.task('default', ['haml', 'sass', 'browser-sync', 'watch']);