sassp
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Sassp Travis CI Build Status

Sass with promise support and extras.

NPM Badge

Install

npm install sassp

Usage

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 });
})();

API

render(options, callback?)

options

Type: object

See https://github.com/sass/dart-sass#javascript-api.

callback

Type: function

Optional callback. If not specified, the function will return a promise. See https://github.com/sass/dart-sass#javascript-api.

renderSync(options)

See https://github.com/sass/dart-sass#javascript-api

renderFile(options, callback?)

Same as render but automatically writes output to outFile and source map to sourceMap if specified.

renderFileSync(options, callback?)

Same as renderFile but syncronous.

Dependents (0)

Package Sidebar

Install

npm i sassp

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.95 kB

Total Files

6

Last publish

Collaborators

  • richienb