1
1
# stylus-loader
2
+
2
3
A [ stylus] ( http://learnboost.github.io/stylus/ ) loader for [ webpack] ( https://github.com/webpack/webpack ) .
3
4
4
5
[ ![ build status] ( https://secure.travis-ci.org/shama/stylus-loader.svg )] ( https://travis-ci.org/shama/stylus-loader )
@@ -29,10 +30,13 @@ Or within the webpack config:
29
30
30
31
``` js
31
32
module: {
32
- loaders: [{
33
- test: / \. styl$ / ,
34
- loader: ' css-loader!stylus-loader?paths=node_modules/bootstrap-stylus/stylus/'
35
- }]
33
+ loaders: [
34
+ {
35
+ test: / \. styl$ / ,
36
+ loader:
37
+ ' css-loader!stylus-loader?paths=node_modules/bootstrap-stylus/stylus/' ,
38
+ },
39
+ ];
36
40
}
37
41
```
38
42
@@ -43,8 +47,8 @@ Use in tandem with the [style-loader](https://github.com/webpack/style-loader) t
43
47
``` js
44
48
module: {
45
49
loaders: [
46
- { test: / \. styl$ / , loader: ' style-loader!css-loader!stylus-loader' }
47
- ]
50
+ { test: / \. styl$ / , loader: ' style-loader!css-loader!stylus-loader' },
51
+ ];
48
52
}
49
53
```
50
54
@@ -55,7 +59,7 @@ and then `require('./file.styl');` will compile and add the CSS to your page.
55
59
``` js
56
60
module: {
57
61
resolve: {
58
- extensions: [' ' , ' .js' , ' .styl' ]
62
+ extensions: [' ' , ' .js' , ' .styl' ];
59
63
}
60
64
}
61
65
```
@@ -82,7 +86,6 @@ stylus: {
82
86
83
87
Multiple configs can be used by giving other configs different names and referring to the with the ` config ` query option.
84
88
85
-
86
89
``` js
87
90
var stylus_plugin = require (' stylus_plugin' );
88
91
module: {
@@ -194,38 +197,39 @@ npm test
194
197
open http://localhost:8080/test/
195
198
```
196
199
197
-
198
200
## Contributing
201
+
199
202
In lieu of a formal styleguide, take care to maintain the existing coding style.
200
203
201
204
## Release History
202
- * Please see https://github.com/shama/stylus-loader/releases
203
- * 3.0.1 - Update install instructions mentioning how to get a version supporting webpack 1 (@mzgoddard )
204
- * 3.0.0 - Fix loader-utils deprecation warning (@ryani33 ), Drop webpack 1 and Node<4 support (@mzgoddard )
205
- * 2.5.1 - Fix paths mutation in options (@vio )
206
- * 2.5.0 - Define paths in global stylusOptions, in addtion to query params (@JounQin )
207
- * 2.4.0 - Add OptionsPlugin to help support webpack 2 (@mzgoddard )
208
- * 2.3.1 - Fix typo in README (@stevewillard )
209
- * 2.3.0 - Fix most use cases of relative path resolving (@mzgoddard ), Add option to prefer a path resolver (webpack or stylus) (@mzgoddard )
210
- * 2.2.0 - Let stylus use option be just a function (@yuffiy ), Track json calls as imports like use calls (@gnarf )
211
- * 2.1.2 - Fix support for stylus include config (@andrewburgess ), Add block-level imports to listimports (@kenaniah )
212
- * 2.1.1 - Support Node 6 (@yyx990803 ), Test in webpack 1 and 2 (@phyllisstein )
213
- * 2.1.0 - Add support for stylus's include and set (@michaek )
214
- * 2.0.1 - Add peer dependency on stylus (@jchitel ), fix PathCache for webpack 2 (@Unhelpful )
215
- * 2.0.0 - Remove dependency on stylus (@kossnocorps )
216
- * 1.6.1 - Remove version breaking change in 1.6.0
217
- * 1.6.0 - Remove dependency on stylus (@kossnocorps )
218
- * 1.3.0 - resolve use() calls (@mzgoddard ), manual imports through path cache (@mzgoddard )
219
- * 1.2.0 - files in package.json (@SimenB ), test running with testem (@mzgoddard ), and some performance changes (@mzgoddard )
220
- * 1.1.0 - Pass through sourceMap option to stylus instead of defaulting to inline. Inherit source-map from devtool (@jordansexton ).
221
- * 1.0.0 - Basic source map support (@skozin ). Remove nib as dep. stylus is now a direct dep (as peerDependencies are deprecated).
222
- * 0.6.0 - Support loader prefixes when resolving paths (@kpdecker ).
223
- * 0.5.0 - Disable Stylus parser caching in listImports (
@DaQuirm ). Update to
[email protected] and
[email protected] as peerDependencies (
@kompot ).
224
- * 0.4.0 - Allow configuration of plugins through webpack config (@bobzoller ). Update to stylus 0.47.2 (@shanewilson ).
225
- * 0.3.1 - Fix when dependency (@tkellen )
226
- * 0.3.0 - Define url resolver() when "resolve url" option is true (@mzgoddard ).
227
- * 0.2.0 - Now tracks dependencies for @import statements making cacheable work. Update stylus dep.
228
- * 0.1.0 - Initial release
205
+
206
+ - Please see https://github.com/shama/stylus-loader/releases
207
+ - 3.0.1 - Update install instructions mentioning how to get a version supporting webpack 1 (@mzgoddard )
208
+ - 3.0.0 - Fix loader-utils deprecation warning (@ryani33 ), Drop webpack 1 and Node<4 support (@mzgoddard )
209
+ - 2.5.1 - Fix paths mutation in options (@vio )
210
+ - 2.5.0 - Define paths in global stylusOptions, in addtion to query params (@JounQin )
211
+ - 2.4.0 - Add OptionsPlugin to help support webpack 2 (@mzgoddard )
212
+ - 2.3.1 - Fix typo in README (@stevewillard )
213
+ - 2.3.0 - Fix most use cases of relative path resolving (@mzgoddard ), Add option to prefer a path resolver (webpack or stylus) (@mzgoddard )
214
+ - 2.2.0 - Let stylus use option be just a function (@yuffiy ), Track json calls as imports like use calls (@gnarf )
215
+ - 2.1.2 - Fix support for stylus include config (@andrewburgess ), Add block-level imports to listimports (@kenaniah )
216
+ - 2.1.1 - Support Node 6 (@yyx990803 ), Test in webpack 1 and 2 (@phyllisstein )
217
+ - 2.1.0 - Add support for stylus's include and set (@michaek )
218
+ - 2.0.1 - Add peer dependency on stylus (@jchitel ), fix PathCache for webpack 2 (@Unhelpful )
219
+ - 2.0.0 - Remove dependency on stylus (@kossnocorps )
220
+ - 1.6.1 - Remove version breaking change in 1.6.0
221
+ - 1.6.0 - Remove dependency on stylus (@kossnocorps )
222
+ - 1.3.0 - resolve use() calls (@mzgoddard ), manual imports through path cache (@mzgoddard )
223
+ - 1.2.0 - files in package.json (@SimenB ), test running with testem (@mzgoddard ), and some performance changes (@mzgoddard )
224
+ - 1.1.0 - Pass through sourceMap option to stylus instead of defaulting to inline. Inherit source-map from devtool (@jordansexton ).
225
+ - 1.0.0 - Basic source map support (@skozin ). Remove nib as dep. stylus is now a direct dep (as peerDependencies are deprecated).
226
+ - 0.6.0 - Support loader prefixes when resolving paths (@kpdecker ).
227
+ - 0.5.0 - Disable Stylus parser caching in listImports (
@DaQuirm ). Update to
[email protected] and
[email protected] as peerDependencies (
@kompot ).
228
+ - 0.4.0 - Allow configuration of plugins through webpack config (@bobzoller ). Update to stylus 0.47.2 (@shanewilson ).
229
+ - 0.3.1 - Fix when dependency (@tkellen )
230
+ - 0.3.0 - Define url resolver() when "resolve url" option is true (@mzgoddard ).
231
+ - 0.2.0 - Now tracks dependencies for @import statements making cacheable work. Update stylus dep.
232
+ - 0.1.0 - Initial release
229
233
230
234
## License
231
235
0 commit comments