Skip to content

Instantly share code, notes, and snippets.

@andymagill
Last active November 10, 2019 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andymagill/2749eefedbd241380429043d73e9c48b to your computer and use it in GitHub Desktop.
Save andymagill/2749eefedbd241380429043d73e9c48b to your computer and use it in GitHub Desktop.
Bugged gulp file, generates css in scss folder
var gulp = require("gulp");
var sass = require("gulp-sass");
var sourcemaps = require('gulp-sourcemaps');
function styles() {
return (
gulp.src('scss/**/*.scss')
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(sourcemaps.init())
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('css/'))
);
}
function watch(){
gulp.watch(['scss/**/*.scss'], styles);
}
exports.styles = styles;
exports.watch = watch;
exports.default = watch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment