-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
44 lines (37 loc) · 1.07 KB
/
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
44
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');
var bourbon = require('node-bourbon');
var reload = browserSync.reload;
var src = {
scss: ['**/[^_]*.scss','!Skeletor.sass/**/skeletor.sass.*.scss','!node_modules/**/*.scss'],
css: '.',
html: 'Skeletor.*/**/*.{html,js}'
};
var config = {
sass: {
outputStyle: 'expanded',
importer: require('node-sass-globbing'),
includePaths:[].concat(
bourbon.includePaths,
'./node_modules/susy/sass',
'./node_modules/breakpoint-sass/stylesheets')
}
}
// Static Server + watching scss/html files
gulp.task('serve', ['sass'], function() {
browserSync.init({
server: ".",
directory: true
});
gulp.watch('Skeletor.*/**/*.scss', ['sass']);
gulp.watch(src.html).on('change', reload);
});
// Compile sass into CSS
gulp.task('sass', function() {
return gulp.src(src.scss)
.pipe(sass(config.sass))
.pipe(gulp.dest(src.css))
.pipe(reload({stream: true}));
});
gulp.task('default', ['serve']);