Created
April 11, 2019 15:01
-
-
Save tristolliday/4114e233a4743d6d4df948e9fc505227 to your computer and use it in GitHub Desktop.
Use gulp to create individual CSS files for each SCSS file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const gulp = require('gulp'); | |
| // SCSS related requires | |
| const sass = require('gulp-sass'); | |
| const autoprefixer = require('gulp-autoprefixer'); | |
| const sassCompiler = require('./gulp-tasks/scss-compiler'); | |
| const changed = require('gulp-changed'); | |
| const defaulSCSSTasks = gulp.parallel( | |
| sassCompiler(gulp, sass, changed, autoprefixer, 'scss/*.scss'), | |
| sassCompiler(gulp, sass, changed, autoprefixer, 'scss/views/*.scss'), | |
| sassCompiler(gulp, sass, changed, autoprefixer, 'scss/views/partials/*.scss') | |
| ); | |
| gulp.task("scss", defaulSCSSTasks); | |
| gulp.task('default', gulp.parallel(defaulSCSSTasks)); | |
| gulp.watch(['scss/*.scss', 'scss/**/*.scss', 'scss/**/**/*.scss', 'scss/**/**/**/*.scss'], defaulSCSSTasks); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment