# rosid-handler-sass

> Load SASS and transform to CSS, add vendor prefixes and minify

Latest version **9.0.1** (published 2026-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install rosid-handler-sass
pnpm add rosid-handler-sass
yarn add rosid-handler-sass
bun add rosid-handler-sass
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 9.0.1 |
| Published | 2026-04-07 |
| First published | 2017-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | electerious |
| Keywords | rosid, handler, transform, compile, sass, scss, postcss, autoprefixer, cssnano |

## Links

- npm: https://www.npmjs.com/package/rosid-handler-sass
- Repository: https://github.com/electerious/rosid-handler-sass
- Issues: https://github.com/electerious/rosid-handler-sass/issues
- npm.io page: https://npm.io/package/rosid-handler-sass

## Dependencies (4)

- [sass](https://npm.io/package/sass.md) ^1.99.0
- [cssnano](https://npm.io/package/cssnano.md) ^7.1.4
- [postcss](https://npm.io/package/postcss.md) ^8.5.8
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^10.4.27

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 9.0.1 (latest) — 2026-04-07
- 9.0.0-0 (next) — 2025-11-15
- 9.0.0 — 2025-11-19
- 8.0.0 — 2020-11-30
- 7.0.0 — 2020-03-20
- 6.0.4 — 2019-02-23
- 6.0.3 — 2019-02-23
- 6.0.2 — 2018-08-25
- 6.0.1 — 2018-07-05
- 6.0.0 — 2018-01-12
- 5.0.2 — 2017-08-08
- 5.0.1 — 2017-07-21
- 5.0.0 — 2017-07-19
- 4.0.1 — 2017-06-10
- 4.0.0 — 2017-04-19

## README

# rosid-handler-sass

[![Test](https://github.com/electerious/rosid-handler-sass/actions/workflows/test.yml/badge.svg)](https://github.com/electerious/rosid-handler-sass/actions/workflows/test.yml)

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

```js
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](https://github.com/electerious/Rosid/blob/master/docs/Routes.md). `rosid-handler-sass` will transform all matching SASS files in your source folder to CSS.

```json
{
  "name": "SASS",
  "path": "[^_]*.{css,sass}*",
  "handler": "rosid-handler-sass"
}
```

```sass
/* main.sass */
.class
	color: white;
```

```css
/* main.css (output) */
.class {
  color: white;
}
```

## Parameters

- `filePath` `{string}` Absolute path to file.
- `options` `{?object}` Options.
  - `optimize` `{?boolean}` - Optimize output. Defaults to `false`.

## Returns

- `{Promise<string>}` The transformed file content.

---
_Source: https://npm.io/package/rosid-handler-sass · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
