Skip to content

Instantly share code, notes, and snippets.

@nicothin
Created December 23, 2016 22:28
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 nicothin/59fc82782e02e6f3cec2bba219adc8b2 to your computer and use it in GitHub Desktop.
Save nicothin/59fc82782e02e6f3cec2bba219adc8b2 to your computer and use it in GitHub Desktop.
gulp.task("style", function() {
gulp.src("sass/style.scss")
.pipe(plumber())
.pipe(sass())
.pipe(postcss([
autoprefixer({browsers: ["last 2 versions"]}),
mqpacker({
sort: function (a, b) {
return a.localeCompare(b);
}
})
]))
.pipe(gulp.dest("build/css"))
.pipe(server.stream())
.pipe(minify())
.pipe(rename("style.min.css"))
.pipe(gulp.dest("build/css"));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment