Skip to content

Instantly share code, notes, and snippets.

@tterb
Created December 20, 2019 07:12
Show Gist options
  • Save tterb/4237729e624e27e8f197710f003e1dc1 to your computer and use it in GitHub Desktop.
Save tterb/4237729e624e27e8f197710f003e1dc1 to your computer and use it in GitHub Desktop.
Gulpfile stylesheets
// Process styles, add vendor-prefixes, minify, then
// output the file to the appropriate location
gulp.task('build:styles:main', () => {
return sass(paths.sassFiles + '/main.scss', {
style: 'compressed',
trace: true,
loadPath: [paths.sassFiles]
}).pipe(postcss([autoprefixer({ browsers: ['last 2 versions']}), cssnano()]))
.pipe(gulp.dest(paths.jekyllCssFiles))
.pipe(gulp.dest(paths.siteCssFiles))
.pipe(browserSync.stream())
.on('error', gutil.log);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment