Skip to content

Instantly share code, notes, and snippets.

@maxlibin
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxlibin/11244599 to your computer and use it in GitHub Desktop.
Save maxlibin/11244599 to your computer and use it in GitHub Desktop.
Gulp sample
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