-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
49 lines (40 loc) · 1.27 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
45
46
47
48
49
// npm install --save-dev gulp gulp-util gulp-sass gulp-sourcemaps gulp-autoprefixer gulp-livereload tiny-lr
var gulp = require('gulp')
var sass = require('gulp-sass')
var autoprefixer = require('gulp-autoprefixer')
var livereload = require('gulp-livereload')
var sourcemaps = require('gulp-sourcemaps')
var childProcess = require('child_process')
var connect = require('gulp-connect-php');
gulp.task('styles', function() {
return gulp.src('assets/sass/style.sass' )
.pipe(sourcemaps.init())
.pipe(sass({
style: 'expanded',
indentedSyntax: true,
errLogToConsole: true
}).on('error', sass.logError))
.pipe(autoprefixer('last 3 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest( 'assets/css' ))
});
gulp.task('default', function() {
connect.server({
port: 8000
})
livereload.listen();
gulp.watch('assets/sass/**/*.sass', ['styles']);
gulp.watch([
'assets/css/*.css',
'assets/js/**/*',
'assets/**/*.html',
'site/templates/**/*.php',
'site/snippets/**/*.php',
'site/blueprints/**/*.php',
], livereload.changed);
});
// // clean up our exec process
// process.on('SIGINT', function(){
// phpServer.kill()
// process.exit()
// });