-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
51 lines (40 loc) · 1.16 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
45
46
47
48
49
50
51
/**
* Created by bram on 7/20/17.
*/
var gulp = require('gulp');
var gulpSass = require('gulp-sass');
var browserSync = require('browser-sync').create();
gulp.task('build', [
'build-html',
'build-sass',
'build-images',
'build-fonts',
]);
gulp.task('build-html', function() {
return gulp.src('src/pages/**')
.pipe(gulp.dest('build/'))
});
gulp.task('build-sass', function() {
return gulp.src('src/assets/stylesheets/**')
.pipe(gulpSass().on('error', gulpSass.logError))
.pipe(gulp.dest('build/assets/css/'))
});
gulp.task('build-fonts', function() {
return gulp.src('src/assets/fonts/**')
.pipe(gulp.dest('build/assets/fonts/'))
})
gulp.task('build-images', function() {
return gulp.src('src/assets/images/**')
.pipe(gulp.dest('build/assets/images/'))
})
gulp.task('serve', function() {
browserSync.init({
server: {
baseDir: "build/"
}
});
gulp.watch("src/assets/stylesheets/**", ['build-sass']);
gulp.watch("src/pages/**", ['build-html']);
gulp.watch("src/components/**", ['build-html']);
gulp.watch("build/**").on('change', browserSync.reload);
});