-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
executable file
·41 lines (36 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
39
40
41
var gulp = require('gulp');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
gulp.task('serve', function() {
browserSync({
server: {
baseDir: ''
}
});
});
gulp.task('sass', function() {
return gulp.src('sass/*.scss')
.pipe(sass({
sourcemap: true,
includePaths: require('node-neat').includePaths
}))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('css'))
.pipe(reload({stream:true}));
});
gulp.task('reload', function() {
browserSync.reload();
});
gulp.task('watch', function() {
gulp.watch('sass/*.scss', { interval: 500 }, ['sass']);
gulp.watch('css/**/*.css', { interval: 500 }, ['reload']);
gulp.watch('js/**/*.js', { interval: 500 }, ['reload']);
gulp.watch('canciones/*.html', { interval: 500 }, ['reload']);
gulp.watch('*.html', { interval: 500 }, ['reload']);
});
gulp.task('default', ['sass', 'serve', 'watch']);