1.0.3 • Published 10 years ago

trucks-transform-less v1.0.3

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

Less Transform

Compile less sources

Reads <style> and <link> elements with a MIME type of text/less and compiles the source to CSS.

<link rel="stylesheet" type="text/less" href="styles.less">
<style type="text/less"></style>

This transform rewrites the contents property of each style node.

Install

npm i trucks-transform-less --save-dev

For the command line interface see trucks-cli.



Usage

Use the less key to configure this transform:

const trucks = require('trucks');

trucks(
  {
    files: ['components.html'],
    transforms: ['less'],
    conf: {
      transforms: {
        less: {
          paths: [process.cwd()]
        }
      }
    }
  }, (err, res) => {
    if(err) {
      throw err; 
    }
    console.log(res);
  }
);

The configuration object is passed to less.render(), see the less 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