Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rus-sharafiev/less-compiler
Standalone LESS compiler
https://github.com/rus-sharafiev/less-compiler
deno deno-app less less-compiler
Last synced: 12 days ago
JSON representation
Standalone LESS compiler
- Host: GitHub
- URL: https://github.com/rus-sharafiev/less-compiler
- Owner: rus-sharafiev
- License: apache-2.0
- Created: 2023-05-20T20:03:32.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-25T21:07:22.000Z (about 1 year ago)
- Last Synced: 2024-10-12T23:45:02.081Z (about 1 month ago)
- Topics: deno, deno-app, less, less-compiler
- Language: JavaScript
- Homepage:
- Size: 161 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Standalone LESS compiler
CLI tool that uses original [Less.js](https://lesscss.org/) compiler (v4.2.0) but running inside [Deno](https://deno.com/) compiled app.
Minimal changes were made to the compiler source code:
- added file extensions in import (required for Deno)
- fs, url and path are replaced with the same ones from Deno Std. Library 0.202.0Unlike the original `lessc`, the Node is not required.
## Usage
Install [Deno](https://docs.deno.com/runtime/manual/getting_started/installation), pick compiler type, for CLI tool run
```
deno compile --allow-read --allow-write less-compiler-cli.ts
```
...for stdout run
```
deno compile --allow-read less-compiler-stdout.ts
```### CLI tool
Run the app, answer questions and get the CSS file (example for PowerShell)
```
PS C:\less> .\less-compiler-cli.exe
Standalone LESS compiler v1.0.0Set source file location: test/index.less
Set outfile folder: ./
Set outfile name: out
Done!Press any key to exit...
```### Stdout (created for the [React development server](https://github.com/rus-sharafiev/dev-server))
Run app with a LESS file path as arg and get the plain css in stdout (example for PowerShell)
```
PS C:\less> .\less-compiler-stdout.exe test/index.less
```