-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
30 lines (26 loc) · 879 Bytes
/
Copy pathgulpfile.js
File metadata and controls
30 lines (26 loc) · 879 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
var gulp = require('gulp'),
browserSync = require('browser-sync').create(),
sass = require('gulp-sass');
gulp.task('browser-sync', ['sass'], function() {
browserSync.init({
server: "./app",
notify: false,
port: 8080,
ui: {
port: 8081
}
});
});
gulp.task('sass', function() {
return gulp.src("app/scss/*.scss")
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(gulp.dest("app/css"))
.pipe(browserSync.stream());
});
gulp.task('watch', ['browser-sync'], function(){
gulp.watch("app/scss/**/*.scss", ['sass']);
gulp.watch("app/**/**/*.js").on('change', browserSync.reload);
gulp.watch("app/*/*.js").on('change', browserSync.reload);
gulp.watch("app/*.html").on('change', browserSync.reload);
});
gulp.task('default', ['watch']);