Skip to content

Instantly share code, notes, and snippets.

@Teddybiers
Last active September 6, 2017 12:59
Show Gist options
  • Save Teddybiers/980a37e0101022e9395ce5bdd43a4061 to your computer and use it in GitHub Desktop.
Save Teddybiers/980a37e0101022e9395ce5bdd43a4061 to your computer and use it in GitHub Desktop.
Sample gulp file for sass to css into wwwroot/css
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.
{
"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