-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nickpape/master
Update README.md
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# gulp-core-build-sass | ||
`gulp-core-build-sass` is a plugin for `gulp-core-build` which introduces the ability to compile SASS files to CSS. | ||
|
||
# Tasks | ||
## SassTask | ||
|
||
### Description | ||
This task invokes `gulp-sass` to compile source SASS files into a CommonJS module which uses `load-themed-styles` to load styles onto the page. If the `libAmdFolder` is specified globally, this task will also output an AMD module. Various templates may be specified. | ||
|
||
### Config | ||
```typescript | ||
interface ISassTaskConfig { | ||
sassMatch?: string[]; | ||
commonModuleTemplate: string; | ||
amdModuleTemplate: string; | ||
} | ||
``` | ||
* ** | ||
|
||
Usage (and defaults): | ||
```typescript | ||
build.webpack.setConfig({ | ||
sassMatch: [ | ||
'src/**/*.scss' | ||
], | ||
commonModuleTemplate: "require('load-themed-styles').loadStyles(<%= content %>);", | ||
amdModuleTemplate: "define(['load-themed-styles'], function(loadStyles) { loadStyles.loadStyles(<%= content %>); });" | ||
) | ||
``` |