-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
35 lines (27 loc) · 917 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
var gulp = require('gulp');
var contentInclude = require('gulp-content-includer');
var rename = require('gulp-rename');
var sass = require('gulp-ruby-sass');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('sass', function () {
return sass('src/scss/**/*.scss',{sourcemap:true})
.on('error', sass.logError)
// For inline sourcemaps
.pipe(sourcemaps.write())
// For file sourcemaps
.pipe(sourcemaps.write('maps', {
includeContent: false,
sourceRoot: 'source'
}))
.pipe(gulp.dest('src/css'));
});
gulp.task('concat',function() {
gulp.src("dev_page/**/[!_]*.html")
.pipe(contentInclude({
includerReg:/<!\-\-include\s+"([^"]+)"\-\->/g
}))
.pipe(gulp.dest('page/'));
});
gulp.task('watch', function () {
gulp.watch(['src/scss/*scss','dev_page/**/*.html'], ['sass','concat']);
});