1.0.3 • Published 10 years ago

trucks-transform-sass v1.0.3

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

Sass Transform

Compile sass sources

Reads <style> and <link> elements with a MIME type of text/sass and compiles the source to CSS using the bindings to libsass for node.

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

This transform rewrites the contents property of each style node.

Install

npm i trucks-transform-sass --save-dev

For the command line interface see trucks-cli.



Usage

Use the sass key to configure this transform:

const trucks = require('trucks');

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

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