Go to file
Sam Richard 8ca25e10ad Added linting
Linting modified from ibm-watson/runner for use in Node
2015-03-24 05:32:12 -05:00
test Added linting 2015-03-24 05:32:12 -05:00
.editorconfig Added linting 2015-03-24 05:32:12 -05:00
.eslintrc Added linting 2015-03-24 05:32:12 -05:00
.gitignore Add node_modules to gitignore 2013-12-14 18:23:28 -08:00
.npmignore Version 1.3.1 2015-01-13 20:49:16 -08:00
.travis.yml Rewrite gulp-sass to be a very light wrapper 2015-03-23 22:30:52 +00:00
CHANGELOG.md Updated node-sass dependency 2015-02-12 13:49:11 -08:00
index.js omitSourceMapUrl instead of hack 2015-03-24 04:51:57 -05:00
LICENSE Initial commit 2013-08-31 14:01:20 -07:00
package.json Added linting 2015-03-24 05:32:12 -05:00
README.md Rewrite gulp-sass to be a very light wrapper 2015-03-23 22:30:52 +00:00

Build Status

gulp-sass

Join the chat at https://gitter.im/dlmanning/gulp-sass

Sass plugin for gulp.

Install

npm install gulp-sass --save-dev

Basic Usage

Something like this:

var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');

gulp.task('sass', function () {
	gulp.src('./scss/*.scss')
		.pipe(sass().on('error', gutil.log))
		.pipe(gulp.dest('./css'));
});

Options passed as a hash into sass() will be passed along to node-sass.

Source Maps TODO

gulp-sass can be used in tandem with gulp-sourcemaps to generate source maps for the SASS to CSS compilation. You will need to initialize gulp-sourcemaps prior to running the gulp-sass compiler and write the source maps after.

var sourcemaps = require('gulp-sourcemaps');

gulp.src('./scss/*.scss')
  .pipe(sourcemaps.init())
    .pipe(sass())
  .pipe(sourcemaps.write())
  .pipe(gulp.dest('./css'));

// will write the source maps inline in the compiled CSS files

By default, gulp-sourcemaps writes the source maps inline in the compiled CSS files. To write them to a separate file, specify a relative file path in the sourcemaps.write() function.

var sourcemaps = require('gulp-sourcemaps');

gulp.src('./scss/*.scss')
  .pipe(sourcemaps.init())
    .pipe(sass())
  .pipe(sourcemaps.write('./maps'))
  .pipe(gulp.dest('./css'));

// will write the source maps to ./dest/css/maps

Issues

Before submitting an issue, please understand that gulp-sass is only a wrapper for node-sass, which in turn is a node front end for libsass. Missing sass features and errors should not be reported here.