Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Thomas Jaggi 2015-05-12 17:59:42 +02:00
commit fc8695a4ca
5 changed files with 30 additions and 8 deletions

View file

@ -1,5 +1,10 @@
# Gulp Sass Changelog
## v2.0.0
**May 6, 2015**
* **Change** :arrow_up: Bump to Node Sass 3.0.0
## v2.0.0-alpha.1
**March 26, 2015**

View file

@ -4,11 +4,11 @@ Gulp Sass is a very light-weight [Gulp](https://github.com/gulpjs/gulp) wrapper
## Submitting Issues
* Before creating a new issue, perform a [cursory search](https://github.com/issues?utf8=%E2%9C%93&q=repo%3Adlmanning%2Fgulp-sass+repo%3Asass%2Fnode-sass+repo%3Asass%2Flibsass+repo%3Asass%2Fsass+repo%3Asass-eyeglass%2Feyeglass) in the Gulp Sass, Node Sass, Libsass, and main Sass repos to see if a similar issue has already been submitted.
* Before creating a new issue, perform a [cursory search](https://github.com/issues?utf8=%E2%9C%93&q=repo%3Adlmanning%2Fgulp-sass+repo%3Asass%2Fnode-sass+repo%3Asass%2Flibsass+repo%3Asass%2Fsass+repo%3Asass-eyeglass%2Feyeglass) in the Gulp Sass, Node Sass, Libsass, and main Sass repos to see if a similar issue has already been submitted. Please also refer to our [Common Issues and Their Fixes](https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes) page for some basic troubleshooting.
* You can create an issue [here](https://github.com/dlmanning/gulp-sass/issues). Please include as many details as possible in your report.
* Issue titles should be descriptive, explaining at the high level what it is about.
* Please include the version of `gulp-sass` you are using.
* Do not open a [pull request](#pull-requests) to resolve an issue without first receiving feedback from a `collaborator` or `owner` and having them agree on a solution forward.
* Please include the version of `gulp-sass`, Node, and NPM you are using, as well as what operating system you are having a problem on.
* _Do not open a [pull request](#pull-requests) to resolve an issue without first receiving feedback from a `collaborator` or `owner` and having them agree on a solution forward_.
* Include screenshots and animated GIFs whenever possible; they are immensely helpful.
* Issues that have a number of sub-items that need to be complete should use [task lists](https://github.com/blog/1375%0A-task-lists-in-gfm-issues-pulls-comments) to track the sub-items in the main issue comment.

View file

@ -13,27 +13,39 @@ npm install gulp-sass --save-dev
Something like this will compile your Sass files:
```javascript
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
gulp.src('./scss/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css'));
gulp.src('./sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css'));
});
gulp.task('sass:watch', function () {
gulp.watch('./sass/**/*.scss', ['sass']);
});
```
You can also compile synchronously, doing something like this:
```javascript
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
gulp.src('./scss/*.scss')
gulp.src('./sass/**/*.scss')
.pipe(sass.sync().on('error', sass.logError))
.pipe(gulp.dest('./css'));
});
gulp.task('sass:watch', function () {
gulp.watch('./sass/**/*.scss', ['sass']);
});
```
## Options

View file

@ -47,7 +47,7 @@ var gulpSass = function gulpSass(options, sync) {
opts.includePaths = [];
}
opts.includePaths.push(path.dirname(file.path));
opts.includePaths.unshift(path.dirname(file.path));
// Generate Source Maps if plugin source-map present
if (file.sourceMap) {

View file

@ -123,7 +123,12 @@ describe('gulp-sass -- async compile', function() {
var stream = sass();
stream.on('error', function(err) {
// Error must include message body
err.message.indexOf('property "font" must be followed by a \':\'').should.not.equal(-1);
// Error must include file error occurs in
err.message.indexOf('test/scss/error.scss').should.not.equal(-1);
// Error must include line and column error occurs on
err.message.indexOf('2:7').should.not.equal(-1);
done();
});
stream.write(errorFile);