Last active
November 10, 2019 00:35
-
-
Save andymagill/2749eefedbd241380429043d73e9c48b to your computer and use it in GitHub Desktop.
Bugged gulp file, generates css in scss folder
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 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