Last active
January 16, 2018 12:01
-
-
Save MervinPraison/4ba77f93b3c7a3f9c797b5636f1e0b03 to your computer and use it in GitHub Desktop.
Gulpfile.js Example
This file contains 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
var gulp = require('gulp'), | |
sass = require('gulp-sass'); | |
var sassConfig = { | |
inputDirectory: 'resources/sass/**/*.scss', | |
outputDirectory: 'assets/css', | |
options: { | |
outputStyle: 'expanded' | |
} | |
} | |
gulp.task('build-css', function() { | |
return gulp | |
.src(sassConfig.inputDirectory) | |
.pipe(sass(sassConfig.options).on('error', sass.logError)) | |
.pipe(gulp.dest(sassConfig.outputDirectory)); | |
}); | |
gulp.task('watch', function() { | |
gulp.watch('resources/sass/**/*.scss', ['build-css']); | |
}); | |
// Default Task | |
gulp.task('default', ['build-css']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment