pug-stylus
Pug filter for stylus
Last updated a year ago by billypon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pug-stylus 
SYNC missed versions from official npm registry.

Setup filter

Install dependencies

npm install stylus

Set 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 red

Output:

body{color:red}

Pretty render.

:stylus(compress=false)
  body
    color red

Output:

body {
  color: red;
}

Render with style tag.

:stylus(wrap=true)
  body
    color red

Output:

<style>body{color:red}</style>

Current Tags

  • 0.0.5                                ...           latest (a year ago)

5 Versions

  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 5
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |