https://github.com/octoprint/pre-commit-lessc
pre-commit compatible wrapper for lessc
https://github.com/octoprint/pre-commit-lessc
Last synced: about 1 year ago
JSON representation
pre-commit compatible wrapper for lessc
- Host: GitHub
- URL: https://github.com/octoprint/pre-commit-lessc
- Owner: OctoPrint
- License: mit
- Created: 2024-09-19T08:57:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-10T07:33:57.000Z (about 1 year ago)
- Last Synced: 2025-05-07T21:07:00.560Z (about 1 year ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pre-commit-lessc
pre-commit compatible wrapper for lessc.
Will turn a list of attached `.less` files into single calls of `lessc` with `source` and `target` files instead.
The relative output path for the `target` is generated from the `less` path and can be controlled through the
`--wrapper-output` command line option, see below.
The version of the hook tracks the version of the installed `less` dependency, e.g. `4.2.0` tracks `lessc: ^4.2.0`.
## Usage
``` yaml
- repo: https://github.com/OctoPrint/pre-commit-lessc
rev: 4.2.0
hooks:
- id: lessc
args: ["--wrapper-quiet", "--clean-css=--s1 --advanced --compatibility=ie8"]
additional_dependencies: ["less-plugin-clean-css"]
files: ^(src/octoprint/static/less/(octoprint|recovery|login)\.less|src/octoprint/plugins/.*/static/less/.*\.less$)
```
### Available command line options
The wrapper's command line options are all prefixed with `--wrapper-`. Anything not prefixed that way will be
forwarded directly to the `lessc` call.
- `--wrapper-output`: Relative output for the generated css files, defaults to `../css`
- `--wrapper-quiet`: Suppress logging (unless there's a runtime error)
## License
MIT