Add documentation for synchronous code options
It's not clearly documented how to add options to sass.sync, and this is implemented inconsistently across other code infrastructures, so it's not safe to assume whether it's `sass(options).sync()` or `sass.sync(options)` please accept the pull request if the proposed documentation is correct, or otherwise accept it anyways and provide a follow up merge as an update fix.
This commit is contained in:
parent
0b3c7e7b83
commit
643f73b64a
10
README.md
10
README.md
|
@ -70,6 +70,16 @@ gulp.task('sass', function () {
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or this for synchronous code:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
gulp.task('sass', function () {
|
||||||
|
return gulp.src('./sass/**/*.scss')
|
||||||
|
.pipe(sass.sync({outputStyle: 'compressed'}).on('error', sass.logError))
|
||||||
|
.pipe(gulp.dest('./css'));
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
## Source Maps
|
## Source Maps
|
||||||
|
|
||||||
`gulp-sass` can be used in tandem with [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) to generate source maps for the Sass to CSS compilation. You will need to initialize [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) prior to running `gulp-sass` and write the source maps after.
|
`gulp-sass` can be used in tandem with [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) to generate source maps for the Sass to CSS compilation. You will need to initialize [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) prior to running `gulp-sass` and write the source maps after.
|
||||||
|
|
Loading…
Reference in a new issue