This package has been deprecated

Author message:

rosid-handler-scss has been replaced by rosid-handler-sass

rosid-handler-scss

4.0.0 • Public • Published

rosid-handler-scss

Travis Build Status Coverage Status Dependencies

A function that loads a SCSS file, transforms it to CSS, adds vendor prefixes and minifies the output.

Install

npm install rosid-handler-scss

Usage

API

const scss = require('rosid-handler-scss')
 
scss('/src/main.scss').then((data) => {})
scss('/src/main.css', { optimize: true }).then((data) => {})

Rosid

Add the following object to your rosidfile.json, rosidfile.js or routes array. rosid-handler-scss will transform all matching SCSS files in your source folder to CSS.

{
  "name"    : "SCSS",
  "path"    : "[^_]*.{css,scss}*",
  "handler" : "rosid-handler-scss"
}
/* main.scss */
.class { color: white; }
/* main.css (output) */
.class { color: white; }

Parameters

  • filePath {String} Absolute path to file.
  • opts {?Object} Options.
    • optimize {?Boolean} - Optimize output. Defaults to false.

Returns

  • {Promise}({String|Buffer}) The transformed file content.

Package Sidebar

Install

npm i rosid-handler-scss

Weekly Downloads

0

Version

4.0.0

License

MIT

Last publish

Collaborators

  • electerious