Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/squarespace/less-compiler
Less compiler in Java
https://github.com/squarespace/less-compiler
Last synced: about 2 months ago
JSON representation
Less compiler in Java
- Host: GitHub
- URL: https://github.com/squarespace/less-compiler
- Owner: Squarespace
- License: apache-2.0
- Created: 2015-05-21T13:51:11.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-01-03T11:11:56.000Z (about 1 year ago)
- Last Synced: 2024-04-14T23:14:59.518Z (9 months ago)
- Language: Java
- Homepage:
- Size: 2.41 MB
- Stars: 18
- Watchers: 15
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Codeowners: CODEOWNERS
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# Squarespace LESS Compiler
A Java implementation of the LESS CSS preprocessor language.
[![Build Status](https://travis-ci.org/Squarespace/less-compiler.svg?branch=master)](https://travis-ci.org/Squarespace/less-compiler)
[![Coverage Status](https://coveralls.io/repos/Squarespace/less-compiler/badge.svg?branch=1.x&service=github)](https://coveralls.io/github/Squarespace/less-compiler?branch=1.x)Current [Less.js][lessjs] compatibility level: 1.3.3
License: [Apache 2.0](LICENSE.txt) ([summary][license-tldr])
Copyright (c) 2021 Squarespace, Inc.
## Project Goals
* Migrate away from use of [Node.js][nodejs] + [Less.js][lessjs] for server-side
conversion of LESS to CSS.
* Maintain compatibility with [Less.js][lessjs], tracking version 1.3.3
(Squarespace's supported version at the time of development).
* Improve performance, reduce memory usage where possible.
* Design must support additional features needed for server-side compilation.
* Design parsing package to closely track the [Less.js][lessjs] parser
structure, to simplify verifying correctness.## Features
* Performance improvement of 2-5x over Less.js when used in server context
* Improved error messages with [full stack traces](docs/error-stack-trace.md)
* [Execution trace mode](docs/execution-trace.md)
* Modular parser that supports fine-grained unit testing of syntax fragments
* High test coverage.## Differences
* JavaScript evaluation support is missing. It may return if / when we can
guarantee speed and safety of JS evaluation in the JVM (Java 8's Nashorn may
provide this).
* Final CSS structure is generated by feeding blocks and rules to a simple
model that ensures they are emitted at the correct scope in the output
document.
* Color keywords can participate in math operations.
* See more complete [list of differences](DIFFERENCES.md)## Usage
git clone [email protected]:Squarespace/squarespace-less.git
cd squarespace-less
gradle makeCli
./lessc -h[lessjs]: http://lesscss.org/ "Less.js"
[nodejs]: http://nodejs.org/ "Node.js"
[license-tldr]: https://tldrlegal.com/license/apache-license-2.0-(apache-2.0) "Apache 2.0 tl;dr"