4.0.0 • Published 10 years ago
webant-handler-stylus v4.0.0
node-modules-webant-handler-stylus
Require stylus files with webant
Installation
$ npm install webant-handler-stylus
Usage
Ensure the stylus
handler is present in your webant configuration file. For example:
{
"entry":"src/js/main.js",
"dest":"build/main.js",
"handlers":["stylus"]
}
You may now require
stylus files:
// Get the compiled CSS.
var css = require("../path/to/styles.stylus");
// Apply the CSS to the document.
document.head.innerHTML += '<style type="text/css">' + css + '</style>';
See the webant module for more information.
Settings
compress
Can be either true
or false
(default). Controls whether the compiled CSS is compressed.
Tests
Ensure phantomjs is installed and in your PATH, then run:
$ npm test