Created
March 24, 2017 02:30
-
-
Save Kimserey/3c976e3755183fc22379b115ca8b4a07 to your computer and use it in GitHub Desktop.
Gulp file with sass compilation and bootup of live-server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var exec = require('child_process').exec; | |
gulp.task('sass', function() { | |
gulp.src('scss/*.scss') | |
.pipe(sass()) | |
.pipe(gulp.dest('.')); | |
}); | |
gulp.task('watch', ['sass'], function() { | |
gulp.watch('scss/*.scss', ['sass']); | |
}) | |
gulp.task('default', ['watch'], function() { | |
exec("live-server"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.1.0", | |
"command": "gulp", | |
"isShellCommand": true, | |
"echoCommand": true, | |
"tasks": [{ | |
"taskName": "sass-1", | |
"suppressTaskName": true, | |
"args": [ | |
"default" | |
], | |
"isBuildCommand": true, | |
"showOutput": "always", | |
"isBackground": true | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment