# sass2less

> Convert SASS (SCSS) to Less

Latest version **0.1.4** (published 2020-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install sass2less
pnpm add sass2less
yarn add sass2less
bun add sass2less
```

Provides the command `sass2less`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2020-07-21 |
| First published | 2019-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.9.0 |
| Dependencies | 1 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dmitriy Konovalov |
| Maintainers | mucluck |
| Keywords | css, sass, sasscss, less, lesscss, less.js, sass2less, loader, converter, webpack, ant, antd, ant-design |

## Links

- npm: https://www.npmjs.com/package/sass2less
- npm.io page: https://npm.io/package/sass2less

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2020-07-21
- 0.1.3 — 2020-07-21
- 0.1.2 — 2020-07-21
- 0.1.1 — 2020-07-21
- 0.1.0 — 2020-07-21
- 0.0.9 — 2019-09-10
- 0.0.8 — 2019-09-10
- 0.0.7 — 2019-09-06
- 0.0.6 — 2019-09-06
- 0.0.5 — 2019-09-06
- 0.0.4 — 2019-09-06
- 0.0.3 — 2019-09-06
- 0.0.2 — 2019-09-05
- 0.0.1 — 2019-09-05

## README

<div align="center">
  <a href="https://github.com/webpack/webpack">
    <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">
  </a>
</div>

# sass2less

A SCSS to Less loader for webpack. For the creation themes in [Ant Design](https://ant.design/).

It's **experimental** alpha version!!!

## Getting Started

It is understood that you have installed `less` and `less-loader` .

To begin, you'll need to install `sass2less` :

``` console
$ yarn add sass2less
```

## CLI

``` console
$ yarn global add sass2less
```

``` js
sass2less < SASS_SCSS_file_path >
```

Then add the loader to your `webpack` config. For example:

**webpack.config.js**

``` js
const sassRegex = /\.s[sc]ss/i;

module.exports = {
    module: {
        rules: [{
            test: sassRegex;
            use: [
                "style-loader",
                "css-loader",
                {
                    loader: "less-loader",
                    options: {
                        sourceMap: !PRODUCTION,
                        prependData: `
                      @import "~antd/dist/antd.less";
                      @import "${__dirname}/src/styles/antd.vars.less";
                    `,
                        lessOptions: {
                            javascriptEnabled: true,
                        },
                    }
                },
                "sass2less"
            ]
        }, ],
    },
};
```

## License

[MIT](./LICENSE)

## TODO

* Tests
* Convert ` `  ` @each `  ` `
* Convert ` `  ` @while `  ` `
* Convert ` `  ` @debug `  ` `
* Convert ` `  ` @error `  ` `
* Convert ` `  ` @warn `  ` `

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