Thursday, April 23, 2015

How To Quickly Spin Up a SASS Project with Gulp.js

Until SASS is officially supported (see the future) we are going to have to use preprocessing tools, which is fine by me because the tools are rockin' these days. Prerequisite is that you have Ruby installed on your system because I'm going to use gulp-ruby-sass which leans on the sass gem. Enough chit chat, lets spin up a project. $gem install sass
npm init (press OK a million times)
npm install gulp --save-dev
npm install gulp-ruby-sass --save-dev
Make a gulpfile.js
var gulp = require('gulp'), 
sass = require('gulp-ruby-sass'); 
gulp.task('styles', function() { 
return sass('sass') 
.pipe(gulp.dest('css')); 
}); 
$mkdir sass && mkdir css
$gulp styles