Skip to content

Instantly share code, notes, and snippets.

@jonsuh
Last active August 29, 2015 14:18
Show Gist options
  • Save jonsuh/b395016e6e62b0e41ef4 to your computer and use it in GitHub Desktop.
Save jonsuh/b395016e6e62b0e41ef4 to your computer and use it in GitHub Desktop.
gulp.task('sass', function() {
return gulp.src('assets/sass/**/*.scss')
.pipe(plumber(plumberOptions))
.pipe(sass(sassOptions))
.pipe(autoprefixer(autoprefixerOptions))
.pipe(gulp.dest('assets/css'))
.pipe(filter(sassFilterOptions))
.pipe(reload(sassReloadOptions));
});
gulp.task('sass-jekyll', function() {
return gulp.src('assets/sass/**/*.scss')
.pipe(plumber(plumberOptions))
.pipe(sass(sassOptions))
.pipe(autoprefixer(autoprefixerOptions))
.pipe(gulp.dest('_site/assets/css'))
.pipe(filter(sassFilterOptions))
.pipe(reload(sassReloadOptions));
});
@jonsuh
Copy link
Author

jonsuh commented Apr 7, 2015

Todd, your approach does work, but in my specific scenario I'm looking to avoid it. The reason is because it triggers Jekyll’s auto-regeneration, and relying on Jekyll to auto-regenerate the changed CSS is slow, which is why I have a separate task to build the CSS directly into Jekyll’s build folder _site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment