|
1 | 1 | # Rewatch
|
2 | 2 |
|
3 |
| -[](https://github.com/rolandpeelen/rewatch/actions/workflows/build.yml) |
4 |
| ------------------------- |
5 |
| -# Info |
| 3 | +## [](https://github.com/rolandpeelen/rewatch/actions/workflows/build.yml) |
6 | 4 |
|
7 |
| -Rewatch is an alternative build system for the [Rescript Compiler](https://rescript-lang.org/) which uses Ninja. It strives to deliver consistent and faster builds in monorepo setups with multiple packages. |
| 5 | +# Info |
8 | 6 |
|
| 7 | +Rewatch is an alternative build system for the [Rescript Compiler](https://rescript-lang.org/) which uses Ninja. It strives to deliver consistent and faster builds in monorepo setups with multiple packages, where the default build system fails to pick up changed interfaces across multiple packages. |
9 | 8 |
|
10 | 9 | # Project Status
|
11 |
| -- [x] Compile Monorepo's with multiple packages |
12 |
| -- [ ] Compile Single Package |
13 |
| -- [ ] Configure executables - potentially interop with some [Melange](https://github.com/melange-re/melange) / [Bucklescript / ReasonML](https://reasonml.github.io/) subset |
14 | 10 |
|
| 11 | +This project should be considered Alpha Status. Currently used to solve a very specific problem within [Walnut](https://github.com/teamwalnut/). We're open to PR's and other contributions to make this more solid. |
| 12 | + |
| 13 | + - [x] Compile Monorepo's with multiple packages |
| 14 | +- [ ] Correctly compile to different formats than `.mjs` (taken from bsconfig) |
| 15 | + - [ ] Error Handling - we still panic here-and-there, don't expect a super smooth UX |
| 16 | + - [ ] Compile Single Package |
| 17 | + - [ ] Configure executables - potentially interop with some [Melange](https://github.com/melange-re/melange) / [Bucklescript / ReasonML](https://reasonml.github.io/) subset |
| 18 | + |
| 19 | +# Usage |
| 20 | + |
| 21 | + 1. Install the package |
| 22 | + |
| 23 | + ``` |
| 24 | + yarn add @rolandpeelen/rewatch |
| 25 | + ``` |
| 26 | + |
| 27 | + 2. Build / Clean / Watch |
| 28 | + |
| 29 | + ``` |
| 30 | + yarn rewatch build . |
| 31 | + ``` |
| 32 | + |
| 33 | + ``` |
| 34 | + yarn rewatch clean . |
| 35 | + ``` |
| 36 | + |
| 37 | + ``` |
| 38 | + yarn rewatch watch . |
| 39 | + ``` |
| 40 | + |
| 41 | + Where `.` is the folder where the 'root' `bsconfig.json` lives. If you encounter a 'stale build error', either directly, or after a while, a `clean` may be needed to clean up some old compiler assets. |
15 | 42 |
|
16 | 43 | # Contributing
|
17 | 44 |
|
18 |
| -Pre-requisites: |
19 |
| -- [Rust](https://rustup.rs/) |
20 |
| -- [NodeJS](https://nodejs.org/en/) - For running testscripts only |
21 |
| -- [Yarn](https://yarnpkg.com/) or [Npm](https://www.npmjs.com/) - Npm probably comes with your node installation |
| 45 | + Pre-requisites: |
| 46 | + |
| 47 | + - [Rust](https://rustup.rs/) |
| 48 | + - [NodeJS](https://nodejs.org/en/) - For running testscripts only |
| 49 | + - [Yarn](https://yarnpkg.com/) or [Npm](https://www.npmjs.com/) - Npm probably comes with your node installation |
22 | 50 |
|
23 | 51 | 1. `cd testrepo && yarn` (install dependencies for submodule)
|
24 |
| -2. `cargo run` |
| 52 | + 2. `cargo run` |
| 53 | + |
| 54 | + Running tests: |
25 | 55 |
|
26 |
| -Running tests: |
27 |
| -1. `./tests/suite.sh` |
| 56 | + 1. `./tests/suite.sh` |
0 commit comments