4.0.0 • Published 7 years ago
rosid-handler-scss v4.0.0
rosid-handler-scss
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 tofalse
.
Returns
{Promise}({String|Buffer})
The transformed file content.
4.0.0
7 years ago
3.0.1
7 years ago
3.0.0
7 years ago
3.0.0-beta.0
7 years ago
2.1.0
7 years ago
2.0.0
8 years ago
2.0.0-beta.0
8 years ago
1.5.3
8 years ago
1.5.2
8 years ago
1.5.1
8 years ago
1.5.0
8 years ago
1.4.0
8 years ago
1.3.0
8 years ago
1.2.0
8 years ago
1.2.0-beta.1
8 years ago
1.2.0-beta.0
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago