Last active
September 6, 2017 12:59
-
-
Save Teddybiers/980a37e0101022e9395ce5bdd43a4061 to your computer and use it in GitHub Desktop.
Sample gulp file for sass to css into wwwroot/css
This file contains 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"), | |
scss = require("gulp-sass"); | |
gulp.task("sass", function () { | |
return gulp.src('Styles/*.scss') | |
.pipe(scss.sync().on('error', scss.logError)) | |
.pipe(gulp.dest('wwwroot/css')); | |
}); | |
gulp.task('watch', function () { | |
gulp.watch('Styles/*.scss', ['sass']); | |
}); | |
// In VS Code you have to run task which related with your tasks.json file. |
This file contains 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, | |
"args": [ | |
"--no-color" | |
], | |
"task": [ | |
{ | |
"taskName": "sass", | |
"isBuildCommand": true, | |
"showOutput": "always" | |
} | |
{ | |
"taskName": "watch", | |
"isBuildCommand": true, | |
"showOutput": "always" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment