-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
44 lines (31 loc) · 1.11 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
(function () {
'use strict'
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');
var jasmineBrowser = require('gulp-jasmine-browser');
gulp.task('serve', ['sass'], function() {
browserSync.init({
server: "src/"
});
gulp.watch('src/assets/sass/components/*.scss', ['sass']);
gulp.watch('src/assets/sass/components/*.scss').on('change', browserSync.reload);;
gulp.watch('src/index.html').on('change', browserSync.reload);
gulp.watch('src/config/app.module.js').on('change', browserSync.reload);
});
gulp.task('sass', function () {
return gulp.src('src/assets/sass/*.scss')
.pipe(sass())
.pipe(gulp.dest('src/assets/styles'))
.pipe(browserSync.stream());
});
gulp.task('watch', function () {
gulp.watch('src/assets/sass/**/*.scss');
});
gulp.task('jasmine', function() {
return gulp.src(['src/scripts/*.js', 'spec/**/*_spec.js'])
.pipe(jasmineBrowser.specRunner())
.pipe(jasmineBrowser.server({port: 8888}));
});
gulp.task('default', ['watch', 'serve'])
})();