-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
34 lines (31 loc) · 1 KB
/
gulpfile.js
File metadata and controls
34 lines (31 loc) · 1 KB
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
let gulp = require('gulp');
let serve = require('gulp-serve');
let browserSync = require('browser-sync').create();
let watch = require('gulp-watch');
let sass = require('gulp-sass');
let watchSass = require("gulp-watch-sass")
gulp.task('browser-reload',function () {
browserSync.reload();
});
gulp.task('browser-sync', function () {
gulp.watch("app/*.html").on('change', browserSync.reload);
browserSync.init({
server: {
baseDir: "./app/",
},
port: 9999
});
});
gulp.task('sass', function () {
gulp.src('app/app.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('app/content/css'));
});
gulp.task('sass:watch', function () {
gulp.watch('app/templates/*/*.scss', ['sass', 'browser-reload']);
});
gulp.task('start', ['sass', 'browser-sync'], function () {
gulp.watch('app/templates/*/*.scss', ['sass', 'browser-reload']);
gulp.watch('app/**/*.js', ['browser-reload']);
gulp.watch('app/**/*.html', ['browser-reload']);
});