Added documentation for imports and partials

dev
David Manning 2014-01-10 15:45:20 -08:00
parent ad12387d58
commit 6b65a312f4
1 changed files with 40 additions and 1 deletions

View File

@ -9,7 +9,7 @@ SASS plugin for [gulp](https://github.com/wearefractal/gulp).
npm install gulp-sass
```
#Usage
#Basic Usage
Something like this:
@ -26,3 +26,42 @@ gulp.task('sass', function () {
Options passed as a hash into ```sass()``` will be passed along to [```node-sass```](https://github.com/andrew/node-sass)
#Imports and Partials
If you want to use imports or partials templates, you'll need to pass the ```includePaths``` option along to node-sass. So if you have files like this:
scss/includes/_settings.scss:
```sass
$blue: #3bbfce;
$margin: 16px;
```
scss/style.scss:
```sass
@import "settings";
.content-navigation {
border-color: $blue;
color:
darken($blue, 9%);
}
.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $blue;
}
```
Your code should look something like this:
```javascript
gulp.task('sass', function () {
gulp.src('./scss/*.scss')
.pipe(sass({includePaths: ['scss/includes']}))
.pipe(gulp.dest('./css'));
});
```