|
1 | | -# rescript-end-to-end |
| 1 | +# ReScript end-to-end |
2 | 2 |
|
3 | | -To install dependencies: |
| 3 | +## What this repo is |
4 | 4 |
|
5 | | -```bash |
6 | | -bun install |
7 | | -``` |
| 5 | +This repo is a cozy landing spot for real‑world ReScript setups. We collect small samples and run them end‑to‑end so we can catch regressions early and, more importantly, help you when something goes sideways. |
| 6 | + |
| 7 | +- **Target audience**: ReScript users who ran into a setup problem and went the extra mile to share a repro. Thank you. Truly. |
| 8 | +- **Goal**: We keep the barrier low so you can share details easily, and we’ll do our best to fix the problem! |
| 9 | + |
| 10 | +## Prerequisites |
8 | 11 |
|
9 | | -To run: |
| 12 | +- Bun (we use it to build and run the tests here) |
| 13 | +- Whatever your sample naturally uses (npm, pnpm, Deno, …) if you want to run that specific sample locally |
| 14 | + |
| 15 | +No pressure: we don’t expect anyone to run all samples locally. |
| 16 | + |
| 17 | +## Quick start |
| 18 | + |
| 19 | +Run the repository’s test suite (we compile tests first, then run them with Bun): |
10 | 20 |
|
11 | 21 | ```bash |
12 | | -bun run index.ts |
| 22 | +bun i |
| 23 | +bun run test |
13 | 24 | ``` |
14 | 25 |
|
15 | | -This project was created using `bun init` in bun v1.2.22. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime. |
| 26 | +Notes: |
| 27 | +- `pretest` runs `rescript build` for you. |
| 28 | +- Some tests call `npm`, `pnpm`, or `deno` under the hood (see `tests/NpmSingleRepo.test.res`, `tests/DenoSingleRepo.test.res`). It’s totally fine if you don’t have all of them installed. |
| 29 | + |
| 30 | +## Repository structure |
| 31 | + |
| 32 | +- `repos/` contains minimal sample projects: |
| 33 | + - `repos/npm/single-project` |
| 34 | + - `repos/pnpm/monorepo` |
| 35 | + - `repos/deno/single-project` |
| 36 | +- `tests/` contains Bun-powered tests that run each sample’s install/clean/build commands. |
| 37 | + |
| 38 | +## Contributing a sample |
| 39 | + |
| 40 | +We’re grateful for any repro you can share. Open a PR with our template and tell us: |
| 41 | +- What your new folder under `repos/` is about. |
| 42 | +- Your package manager and the commands you run (install / clean / build) |
| 43 | +- ReScript version(s) |
| 44 | +- Your OS (Windows, macOS, Ubuntu) |
| 45 | +- What you expected vs. what actually happened |
| 46 | +- A link to the upstream compiler issue (see below) |
| 47 | + |
| 48 | +If wiring up tests feels like too much today, that’s okay—we’ll try to help. And if you can prep a bit more, it helps us help you faster. |
| 49 | + |
| 50 | +## Where to report issues |
| 51 | + |
| 52 | +Please don’t open issues here. File them in the main compiler repo instead: [rescript-lang/rescript](https://github.com/rescript-lang/rescript). We use this repo to host samples and run them. |
| 53 | + |
| 54 | +For background on ReScript itself, see the project README and docs linked from the repo above. |
| 55 | + |
| 56 | +Thanks again for helping make ReScript better: you rock! |
0 commit comments