-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
34 lines (27 loc) · 848 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
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var browserSync = require('browser-sync');
var sass = require('gulp-sass');
gulp.task('lint', function() {
gulp.src('./app/js/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('sass', function() {
gulp.src('./app/scss/*.scss')
.pipe(sass())
.pipe(gulp.dest('./app/css'));
});
gulp.task('browser-sync', ['sass'], function() {
browserSync({
server: {
baseDir: 'app'
},
})
});
gulp.task('watch',function(){
gulp.watch('./app/scss/*.scss', ['sass']);
gulp.watch('./app/js/*.js', ['lint', 'sass']);
gulp.watch(['./app/*.html', './app/css/*.css', './app/js/*.js', './app/images/*'], browserSync.reload);
})
gulp.task('default', ['lint', 'sass', 'browser-sync','watch']);