https://github.com/jaywcjlove/compile-less
All `.less` files are compiled into `.css` files.
https://github.com/jaywcjlove/compile-less
cli css javascript less lesscss style
Last synced: 20 days ago
JSON representation
All `.less` files are compiled into `.css` files.
- Host: GitHub
- URL: https://github.com/jaywcjlove/compile-less
- Owner: jaywcjlove
- License: mit
- Created: 2019-04-02T07:51:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-05T16:37:18.000Z (24 days ago)
- Last Synced: 2025-04-09T19:09:28.302Z (20 days ago)
- Topics: cli, css, javascript, less, lesscss, style
- Language: TypeScript
- Homepage: https://jaywcjlove.github.io/compile-less
- Size: 369 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
compile-less
===[](https://jaywcjlove.github.io/#/sponsor)
[](https://github.com/jaywcjlove/compile-less/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/compile-less-cli)
[](https://github.com/jaywcjlove/compile-less/releases)
[](https://www.npmjs.com/package/compile-less-cli)
[](https://jaywcjlove.github.io/compile-less/lcov-report/)All `.less` files are compiled into `.css` files.
## Install
```bash
npm i compile-less-cli --save-dev
```## Basic Usage
```js
const compileLess = require('compile-less-cli');compileLess('src', {
out: 'out', // Output directory.
combine: 'dist/uiw.css', // Combine CSS files.
});
```## Command Line
Command help:
```bash
Usage: compile-less [options]All .less files are output to a .css file.
Options:
-v, --version output the version number
-d, --dir Less file directory (default: "src")
-o, --out Output directory.
-c, --combine Combine CSS files.
-w, --watch Watch and compile CSS files.
--exclude-css Exclude CSS file compilation.
-r, --rm-global Remove ":global" and ":global(className)".
-h, --help display help for commandExamples:
$ compile-less -d src -o css
$ compile-less -d src -o css --watch
$ compile-less -d src -o css --watch --exclude-css
$ compile-less -d src -o out --combine out/dist.css
```## Development
Listen for files compiled with TypeScript
```bash
npm run start
npm run build
``````bash
cd test
compile-less -d src -o out
```## License
Licensed under the MIT License.