Last active
August 29, 2015 14:00
-
-
Save maxlibin/11244599 to your computer and use it in GitHub Desktop.
Gulp sample
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
var g = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
notify = require("gulp-notify"), | |
changed = require("gulp-changed"), | |
sftp = require("gulp-sftp"), | |
watch = require('gulp-watch'); | |
sources = { | |
sass: "sass/*.scss", | |
js: "coffee/*.coffee", | |
css : "css/*.css", | |
img: "img/tools/*" | |
} | |
output = { | |
css : "assets/css/", | |
} | |
g.task('sass', function(){ | |
return g.src(sources.sass) | |
.pipe(changed(sources.css)) | |
.pipe(sass({style:'compressed'})) | |
.pipe(g.dest(output.css)) | |
.pipe(notify('scss converted to css and compressed')); | |
}); | |
g.task('watch', function(){ | |
g.watch(sources.sass, ['sass']) | |
}); | |
g.task('default', ['sass', 'watch']) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment