Skip to content

Commit e6305a3

Browse files
authored
Merge pull request #4850 from rescript-lang/remove_ocp_pack
remove ocp-ocamlres dev dependency
2 parents 72971fb + 957a09a commit e6305a3

11 files changed

+3893
-3664
lines changed

jscomp/bsb/Docs.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ Bsb is ReScript's build system. User-facing documentations are [here](https://re
44

55
This directory hosts its implementation. It reads into `bsconfig.json`, uses some BS/OCaml/Reason-specific logic, and generates a [ninja](https://ninja-build.org) build file then calls `ninja` on it. So much of the incremental build and perf work is delegated to Ninja.
66

7-
There's a `templates/` subdirectory. It's the thing shown when you do `bsb -themes`. To generate a template for the user, it basically picks the chosen template from `templates/` and copy pastes it into the destined user directory while substituting some strings in those templates, like `${bsb:proj-version}` in the `package.json`s. The copy-pasting of folders isn't actually done naively through a call to unix `cp`. It's cleverly achieved through something called ocamlres. Please see more descriptions in `pack-templates.sh`.
7+
There's a `templates/` subdirectory. It's the thing shown when you do `bsb -themes`. To generate a template for the user, it basically picks the chosen template from `templates/` and copy pastes it into the destined user directory while substituting some strings in those templates, like `${bsb:proj-version}` in the `package.json`s.
88

99
## Add/edit a template
1010

11-
The content of `templates` is packed into `bsb_templates.ml` automatically when running `pack-templates.sh`, located in this directory.
11+
The content of `templates` is packed into `bsb_templates.ml` automatically when running [pack.js](../../scripts/pack.js).
1212

13-
When adding/editing a template the script needs to be rerun to update the relevant parts in `bsb_templates.ml`. The script uses [`ocamlres`](https://github.com/OCamlPro/ocp-ocamlres), a tool for embedding files inside ocaml executables. You will need to install it with [`opam`](https://opam.ocaml.org/doc/Install.html), ocaml package manager. Follow the [instructions](https://opam.ocaml.org/doc/Install.html) to install `opam`, if you haven't installed it yet. To install `ocp-ocamlres` run:
14-
15-
```sh
16-
opam install ocp-ocamlres
17-
```
13+
When adding/editing a template the script needs to be rerun to update the relevant parts in `bsb_templates.ml`.
1814

1915
## Testing a template locally
2016

0 commit comments

Comments
 (0)