Last active
August 29, 2015 14:00
-
-
Save MoOx/11352794 to your computer and use it in GitHub Desktop.
Gulp / Myth
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") | |
var gutil = require("gulp-util") | |
var plumber = require("gulp-plumber") | |
var myth = require("gulp-myth") | |
var csso = require("gulp-csso") | |
var watch = false | |
gulp.task("styles", function() { | |
return gulp.src("./src/css/*.css") | |
.pipe(watch ? plumber() : gutil.noop()) | |
.pipe(myth({sourcemap: !gulp.env.production})) | |
.pipe(gulp.env.production ? csso() : gutil.noop()) | |
.pipe(gulp.dest("./dist/css/")) | |
}) | |
gulp.task("dev", ["styles"], function() { | |
watch = true | |
gulp.watch("./src/css/**/*", ["styles"]) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment