Package Exports
- stylus-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stylus-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stylus-loader
Usage
var css = require('!raw!stylus!./file.styl'); // Just the CSS
var css = require('!css!stylus!./file.styl'); // CSS with processed url(...)s
See css-loader to see the effect of processed url(...)
s.
Or within the webpack config:
module: {
loaders: [{
test: /\.styl$/,
loader: 'css-loader!stylus-loader?paths=node_modules/bootstrap-stylus/stylus/'
}]
}
Then you can: var css = require('./file.styl');
.
Use in tandem with the style-loader to add the css rules to your document
:
module: {
loaders: [
{ test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader' }
]
}
and then require('./file.style');
will compile and add the CSS to your page.
Install
npm install stylus-loader --save-dev
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style.
Release History
- 0.1.0 - Initial release
License
Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.