sass2less

0.1.4 • Public • Published

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

MIT

TODO

  • Tests
  • Convert @each
  • Convert @while
  • Convert @debug
  • Convert @error
  • Convert @warn

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.40latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00
0.0.90
0.0.80
0.0.71
0.0.61
0.0.50
0.0.40
0.0.31
0.0.20
0.0.10

Package Sidebar

Install

npm i sass2less

Weekly Downloads

3

Version

0.1.4

License

MIT

Unpacked Size

10.8 kB

Total Files

22

Last publish

Collaborators

  • mucluck