sass2less
v0.1.4
Published
Convert SASS (SCSS) to Less
Downloads
13
Maintainers
Readme
sass2less
A SCSS to Less loader for webpack. For the creation themes in 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
:
$ yarn add sass2less
CLI
$ yarn global add sass2less
sass2less < SASS_SCSS_file_path >
Then add the loader to your webpack
config. For example:
webpack.config.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
TODO
- Tests
- Convert
@each
- Convert
@while
- Convert
@debug
- Convert
@error
- Convert
@warn