Last active
October 9, 2015 00:21
-
-
Save auniverseaway/0421aaf8251451233546 to your computer and use it in GitHub Desktop.
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'); | |
var sass = require('gulp-sass'); | |
var minifyCss = require('gulp-minify-css'); | |
var sourceMaps = require('gulp-sourcemaps'); | |
var rename = require("gulp-rename"); | |
gulp.task('styles', function() { | |
gulp.src('./**/scss/*.scss', {base: '.'}) | |
.pipe(sass().on('error', sass.logError)) | |
.pipe(rename(function (path) { | |
path.dirname += "/../css"; | |
return path; | |
})) | |
.pipe(minifyCss()) | |
.pipe(sourceMaps.init()) | |
.pipe(sourceMaps.write('.')) | |
.pipe(gulp.dest('.')) | |
}); | |
//Watch task | |
gulp.task('default',function() { | |
gulp.watch('./**/scss/*.scss',['styles']); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment