Skip to content

Instantly share code, notes, and snippets.

@marcellorg
Created August 3, 2017 15:59
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 marcellorg/61722bc8f68875b83e0cb2c8a431bfbe to your computer and use it in GitHub Desktop.
Save marcellorg/61722bc8f68875b83e0cb2c8a431bfbe to your computer and use it in GitHub Desktop.
gulp.task('scss', function() {
var source = gulp.src('sources/sass/theme.scss')
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(sass());
var pipe1 = source.pipe(clone())
.pipe(sourcemaps.write('.'))
// .pipe(rename('custom-editor-style.css'))
.pipe(gulp.dest('css'))
var pipe2 = source.pipe(clone())
.pipe(cssnano())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('css'));
return merge(pipe1, pipe2);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment