Skip to content

Commit 5072b10

Browse files
authored
Generate opam file and improve CONTRIBUTING.md (#659)
1 parent c88f10d commit 5072b10

File tree

3 files changed

+52
-2
lines changed

3 files changed

+52
-2
lines changed

CONTRIBUTING.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,21 @@ Thanks for your interest. Below is an informal spec of how the plugin's server c
2525
## Install Dependencies
2626

2727
- Run `npm install` at the root. This will also install the npm modules for both the `client` and `server` folders.
28-
- `opam switch 4.14.0` (if you haven't created the switch, do it). OPAM [here](https://opam.ocaml.org). This is needed for the `analysis` folder, which is native code.
29-
- Optionally, you can `opam install ocamlformat` and format the `.ml` files in `analysis`.
28+
29+
## Analysis Binary
30+
31+
This is needed for the `analysis` folder, which is native code.
32+
33+
```sh
34+
# If you haven't created the switch, do it. OPAM(https://opam.ocaml.org)
35+
opam switch 4.14.0 # can also create local switch with opam switch create . 4.14.0
36+
37+
# Install dev dependencies from OPAM
38+
opam install . --deps-only
39+
40+
# For IDE support, install the OCaml language server
41+
opam install ocaml-lsp-server
42+
```
3043

3144
## Build & Run
3245

analysis/dune-project

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
(lang dune 2.0)
22

3+
(generate_opam_files true)
4+
5+
(authors "Cristiano Calcagno")
6+
7+
(maintainers "Cristiano Calcagno")
8+
9+
(homepage "https://github.com/rescript-lang/rescript-vscode")
10+
11+
(bug_reports "https://github.com/rescript-lang/rescript-vscode/issues")
12+
313
(package
414
(name rescript-vscode)
515
(synopsis "ReScript vscode support")

analysis/rescript-vscode.opam

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This file is generated by dune, edit dune-project instead
2+
opam-version: "2.0"
3+
synopsis: "ReScript vscode support"
4+
maintainer: ["Cristiano Calcagno"]
5+
authors: ["Cristiano Calcagno"]
6+
homepage: "https://github.com/rescript-lang/rescript-vscode"
7+
bug-reports: "https://github.com/rescript-lang/rescript-vscode/issues"
8+
depends: [
9+
"ocaml" {>= "4.10"}
10+
"ocamlformat" {= "0.22.4"}
11+
"reanalyze" {= "2.23.0"}
12+
"dune"
13+
]
14+
build: [
15+
["dune" "subst"] {pinned}
16+
[
17+
"dune"
18+
"build"
19+
"-p"
20+
name
21+
"-j"
22+
jobs
23+
"@install"
24+
"@runtest" {with-test}
25+
"@doc" {with-doc}
26+
]
27+
]

0 commit comments

Comments
 (0)