1.0.3 • Published 10 years ago

trucks-transform-stylus v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

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

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago