0.0.5 • Published 7 years ago
pug-stylus v0.0.5
Setup filter
Install dependencies
npm install stylusSet as pug filter
const pug = require('pug');
pug.filters.stylus = require('pug-stylus')();Set filename for stylus when render
pug.filters.stylus = require('pug-stylus')(function (options, args) {
options.filename = args.filename;
});Use filter
:stylus
body
color redOutput:
body{color:red}Pretty render.
:stylus(compress=false)
body
color redOutput:
body {
color: red;
}Render with style tag.
:stylus(wrap=true)
body
color redOutput:
<style>body{color:red}</style>