-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (31 loc) · 1.01 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
var gulp = require('gulp');
var sass = require('gulp-sass');
var bs = require('browser-sync').create();
var connect = require('gulp-connect');
gulp.task('default', function() {
});
gulp.task('serve', ['sass', 'fonts'], function() {
connect.server({
root: "./",
port: 3000
});
gulp.watch('./public/fonts/digital-7-webfont.*', ['fonts']);
gulp.watch("./public/scss/*.scss", ['sass']);
gulp.watch("./public/app/*.js").on('change', bs.reload);
gulp.watch("./*.html").on('change', bs.reload);
});
gulp.task('fonts', function() {
return gulp.src(['./public/fonts/digital-7-webfont.*'])
.pipe(gulp.dest('./dist/fonts/'));
});
gulp.task('sass', function() {
return gulp.src('./public/scss/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./dist/css'))
.pipe(bs.stream());
});
gulp.task('watch', function () {
gulp.watch('./public/fonts/digital-7-webfont.*', ['fonts']);
gulp.watch('./public/scss/*.scss', ['sass']);
gulp.watch("./index.html").on('change', bs.reload);
});