-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
43 lines (33 loc) · 999 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
42
43
var gulp = require('gulp');
// Requires the gulp-sass plugin
var sass = require('gulp-sass');
var haml = require('gulp-haml');
var gih = require('gulp-include-html');
var browserSync = require('browser-sync').create();
gulp.task('hello', function() {
console.log('Hello Nice Guy');
});
gulp.task('browserSync', function() {
browserSync.init({
server: {
baseDir: 'app'
},
})
})
gulp.task('sass', function(){
return gulp.src('app/styles/**/*.scss') // Gets all files ending with .scss in app/scss and children dirs
.pipe(sass()) // Converts Sass to CSS with gulp-sass
.pipe(gulp.dest('app/css'))
.pipe(browserSync.reload({
stream: true
}))
});
gulp.task('watch', ['browserSync', 'sass'], function (){
gulp.watch('app/scss/**/*.scss', ['sass']);
// Other watchers
});
gulp.task('haml', function() {
return gulp.src('.app/**/*.haml')
.pipe(haml())
.pipe(gulp.dest('app/html'))
});