8.0.0 • Published 3 years ago

rosid-handler-sass v8.0.0

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

rosid-handler-sass

Travis Build Status Coverage Status Dependencies Greenkeeper badge

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

Install

npm install rosid-handler-sass

Usage

API

const handler = require('rosid-handler-sass')

handler('main.sass').then((data) => {})
handler('main.css', { optimize: true }).then((data) => {})

Rosid

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

{
  "name"    : "SASS",
  "path"    : "[^_]*.{css,sass}*",
  "handler" : "rosid-handler-sass"
}
/* main.sass */
.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.
8.0.0

3 years ago

7.0.0

4 years ago

6.0.4

5 years ago

6.0.3

5 years ago

6.0.2

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.0.2

7 years ago

5.0.1

7 years ago

5.0.0

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago