Sass with promise support and extras.
npm install sassp
const sass = require("sassp");
(async () => {
const { css } = await sass.render({ file: "index.sass" });
console.log(css.toString());
//=> `body { background-color: white; }`
await sass.renderFile({ file: "index.sass", outFile: "index.css", sourceMap: true });
})();
Type: object
See https://github.com/sass/dart-sass#javascript-api.
Type: function
Optional callback. If not specified, the function will return a promise. See https://github.com/sass/dart-sass#javascript-api.
See https://github.com/sass/dart-sass#javascript-api
Same as render
but automatically writes output to outFile
and source map to sourceMap
if specified.
Same as renderFile
but syncronous.