Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gulp for designers - Getting started with Gulp.js :
var gulp = require('gulp'),
sass = require('gulp-sass'),
minifyCSS = require('gulp-minify-css'),
rename = require('gulp-rename');
gulp.task('sass-to-css-please', function() {
return gulp.src('./scss/site.scss')
.pipe(sass()) //Concatinate our Sass files into CSS
.pipe(minifyCSS()) //Minify the CSS file that is output
.pipe(rename('styles.min.css')) //Rename this CSS file
.pipe(gulp.dest('./css/')); //Put this CSS in our CSS folder
"name": "NewGulpProject",
"description": "An example of how you can get started with Gulp.js",
"version": "0.0.0",
"author": "@alistairtweedie",
"devDependencies": {
"gulp": "3.9.0",
"gulp-minify-css": "1.2.0",
"gulp-rename": "1.2.2",
"gulp-sass": "2.0.4"
$npm install gulp -g
$npm install gulp —save-dev
$ npm install gulp-sass gulp-minify-css gulp-rename —save-dev
$ gulp sass-to-css-please
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment