README
Stylus Transform
Compile stylus sources
Reads <style>
and <link>
elements with a MIME type of text/stylus
and compiles the source to CSS.
<link rel="stylesheet" type="text/stylus" href="styles.styl">
<style type="text/stylus"></style>
This transform rewrites the contents
property of each style node.
Install
npm i trucks-transform-stylus --save-dev
For the command line interface see trucks-cli.
Usage
Use the stylus
key to configure this transform:
const trucks = require('trucks');
trucks(
{
files: ['components.html'],
transforms: ['stylus'],
conf: {
transforms: {
stylus: {
paths: [process.cwd()]
}
}
}
}, (err, res) => {
if(err) {
throw err;
}
console.log(res);
}
);
The configuration object is passed to stylus.render()
, see the stylus documentation.
License
MIT
Created by mkdoc on July 18, 2016