Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T00:58:02.000Z (9 months ago)
- Last Synced: 2024-04-14T02:22:10.473Z (7 months ago)
- Topics: cli, css, javascript, less, lesscss, style
- Language: TypeScript
- Homepage: https://jaywcjlove.github.io/compile-less
- Size: 364 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
compile-less
===[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![CI](https://github.com/jaywcjlove/compile-less/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/compile-less/actions/workflows/ci.yml)
[![npm download](https://img.shields.io/npm/dm/compile-less-cli.svg?style=flat)](https://www.npmjs.com/package/compile-less-cli)
[![releases version](https://img.shields.io/github/release/jaywcjlove/compile-less)](https://github.com/jaywcjlove/compile-less/releases)
[![npm version](https://img.shields.io/npm/v/compile-less-cli.svg)](https://www.npmjs.com/package/compile-less-cli)
[![Coverage Status](https://jaywcjlove.github.io/compile-less/badges.svg)](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.