Skip to content

Instantly share code, notes, and snippets.

@MoOx
Last active August 29, 2015 14:00
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 MoOx/11352794 to your computer and use it in GitHub Desktop.
Save MoOx/11352794 to your computer and use it in GitHub Desktop.
Gulp / Myth
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