https://github.com/samouri/ocaml-css
css parser and printer for both OCaml and JavaScript.
https://github.com/samouri/ocaml-css
Last synced: about 1 year ago
JSON representation
css parser and printer for both OCaml and JavaScript.
- Host: GitHub
- URL: https://github.com/samouri/ocaml-css
- Owner: samouri
- Created: 2018-07-25T07:19:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-04T00:46:25.000Z (over 7 years ago)
- Last Synced: 2025-03-01T16:04:40.480Z (over 1 year ago)
- Language: OCaml
- Homepage: https://samouri.github.io/ocaml-css
- Size: 2.41 MB
- Stars: 36
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# css-parse
[](https://travis-ci.org/samouri/ocaml-css)
parse, detect errors, and pretty-print css directly in terminal, natively in OCaml, or even from JavaScript.
**this is under active development, please do not use yet**
### Overview
`css-parse` is written in OCaml and utilizes ocamllex and [menhir](http://gallium.inria.fr/~fpottier/menhir/manual.html) for lexer and parser generation. A pretty good introduction and explanation of the tools can be found in [Real World Ocaml](https://v1.realworldocaml.org/v1/en/html/parsing-with-ocamllex-and-menhir.html).
We generate a binary as well that can be run from the command line.
### Development
You'll need to install esy as well as menhir.
To bootstrap the project run:
```
esy install
make
```
### Testing Done
In order to test this module, I've stolen test cases from the very well tested [reworkcss](https://github.com/reworkcss/css).
All of the test cases are run through OUnit and can be executed with:
```
make test
```