-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
36 lines (31 loc) · 868 Bytes
/
gulpfile.js
File metadata and controls
36 lines (31 loc) · 868 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
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var rename = require('gulp-rename');
var bower = require('gulp-bower');
var sourcemaps = require('gulp-sourcemaps');
var config = {
sassPath: './sass',
bowerDir: './bower_components'
}
gulp.task('bower', function() {
return bower()
.pipe(gulp.dest(config.bowerDir));
});
gulp.task('sass', function() {
return sass(config.sassPath + '/*.scss', {
sourcemap: true,
loadPath: [
config.bowerDir + '/normalize-scss/sass',
config.bowerDir + '/support-for/sass',
]
})
.pipe(rename({suffix: '.min'}))
.on('error', sass.logError)
// For inline sourcemaps
.pipe(sourcemaps.write())
.pipe(gulp.dest('.'));
});
gulp.task('watch', function (){
gulp.watch([config.sassPath+'/*.scss'], ['sass']);
});
gulp.task('default', ['bower','sass']);