-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
37 lines (32 loc) · 994 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
33
34
35
36
37
var gulp = require( 'gulp' ),
plumber = require( 'gulp-plumber' ),
livereload = require( 'gulp-livereload' ),
sass = require( 'gulp-sass' ),
autoprefixer = require( 'gulp-autoprefixer' );
var onError = function( err ) {
console.log( 'An error occurred:', err.message );
this.emit( 'end' );
}
var PATHS = {
sass: [
],
javascript: [
]
};
gulp.task( 'scss', function() {
return gulp.src( 'style.scss' )
.pipe( plumber( { errorHandler: onError } ) )
.pipe( sass({ includePaths : PATHS.sass }) )
.pipe( autoprefixer('last 3 version') )
.pipe( gulp.dest( './' ) )
.pipe( livereload() );
} );
gulp.task( 'watch', function() {
livereload.listen();
// gulp.watch( 'style.scss', gulp.series('scss') );
gulp.watch( './**/**/*.php' ).on( 'change', function( file ) {
livereload.changed( file );
} );
} );
gulp.task( 'default', gulp.series('watch', function() {
}));