
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
This npm package will convert all your less files to scss.
You can provide an entire folder, this package will scan all less files whose find in subfolders and it'll create SCSS files in the same folder or in the new directory provided recreating the source hierarchy.
Install it via npm:
$ npm install less2scss --global
less2scss offers a single command line interface:
$ less2scss
Will print an help:
Usage: less2scss [options]
This utility quickly converts all your less files to scss.
Options:
-V, --version output the version number
-s, --src <sourcePaths> comma separated source paths
-d, --dst <dstPath> destination path
-e, --exclude <excludePaths> comma separated exclude paths
-r, --recursive allow to recursively walk directories (default: false)
-h, --help display help for command
You can pass the following options via CLI arguments.
| Description | Short command | Full command | Mandatory | Default value |
|---|---|---|---|---|
| Comma separated LESS files and paths | -s | --src | Yes | - |
| Destination path for converted SCSS files (if provided). If not provided, it will be the same directory | -d | --dst | No | Same directory of files provided |
| Comma separated exclude paths | -e | --exclude | No | - |
| Allow to recursively walk directories | -r | --recursive | No | false |
Note:
For excluding files and path we use ignore package.
_ignore is a manager, filter and parser which implemented in pure JavaScript according to the .gitignore spec 2.22.1.
All paths provided must be relative to the source path
node_modules and vendor subfolders.$ less2scss -s ./less_folder -d ./scss_folder -r -e 'node_modules,vendor'
test.$ less2scss -s ./less_folder -d ./scss_folder -r -e 'node_modules,vendor'
Be careful, something may not be converted properly.
It's an automatic conversion tool, you can fix errors manually later.
Some convertion rules are inspired by:
If you have suggestions for enhancements or ideas for new features that could be useful, please open a pull request or open an issue.
less2scss is licensed under : The Apache Software License, Version 2.0. You can find a copy of the license (http://www.apache.org/licenses/LICENSE-2.0.txt)
Enjoy ;)
FAQs
This utility quickly converts all your less files to scss.
The npm package less2scss receives a total of 146 weekly downloads. As such, less2scss popularity was classified as not popular.
We found that less2scss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.