trucks-transform-sass

1.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i trucks-transform-sass

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • muji
  • tmpfs