Skip to content

Commit 5a902ff

Browse files
Merge pull request #787 from DZakh-forks/clean-up-build-doc
Clean up package.json and build docs
2 parents be7cd25 + 362ae5c commit 5a902ff

File tree

5 files changed

+37
-36
lines changed

5 files changed

+37
-36
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This is the official documentation platform for the [ReScript](https://rescript-
99
**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript-compiler).**
1010

1111
**In case you are missing some specific documentation:**
12+
1213
- Some language / compiler feature may not be documented yet
1314
- Create an issue to let us know what you are missing
1415
- In case you want to contribute missing docs, please refer to our [Contribution section](#contributing)
@@ -42,7 +43,7 @@ open localhost:3000
4243
In case you want to run ReScript in watchmode:
4344

4445
```sh
45-
npx rescript build -w
46+
npx rescript -w
4647
```
4748

4849
## Build Index Data
@@ -82,9 +83,10 @@ build specific pages (file `index_data/x.json` not found).
8283
### Markdown Codeblock Tests
8384

8485
We check the validity of our code examples marked with:
85-
- `` ```res example `` (ReScript code snippet)
86-
- `` ```res sig `` (signature)
87-
- `` ```res prelude `` (ReScript code snippet available for all subsequent code snippets)
86+
87+
- ` ```res example ` (ReScript code snippet)
88+
- ` ```res sig ` (signature)
89+
- ` ```res prelude ` (ReScript code snippet available for all subsequent code snippets)
8890

8991
Run the checks with:
9092

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@
4242
"remark-parse": "^10.0.2",
4343
"remark-slug": "^5.1.2",
4444
"remark-stringify": "^7.0.3",
45+
"rescript": "^11.0.0",
4546
"request": "^2.88.0",
4647
"stringify-object": "^3.3.0",
4748
"unified": "^8.4.0"
4849
},
4950
"scripts": {
5051
"dev": "next",
51-
"build": "rescript clean -with-deps && rescript && npm run update-index && next build",
52+
"build": "rescript && npm run update-index && next build",
5253
"test": "node scripts/test-examples.mjs && node scripts/test-hrefs.mjs",
5354
"reanalyze": "reanalyze -all-cmt .",
5455
"update-index": "node scripts/extract-indices.mjs && node scripts/extract-tocs.mjs && node scripts/extract-syntax.mjs && node scripts/generate_feed.mjs > public/blog/feed.xml"
@@ -61,7 +62,6 @@
6162
"postcss": "^8.4.27",
6263
"postcss-cli": "^8.3.0",
6364
"reanalyze": "^2.16.0",
64-
"rescript": "^11.0.0-rc.6",
6565
"simple-functional-loader": "^1.2.1",
6666
"tailwindcss": "^3.3.3"
6767
}

pages/docs/manual/latest/build-overview.mdx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,29 @@ Every ReScript project needs a build description file, `rescript.json`.
1313

1414
## Options
1515

16-
See `rescript -help`:
16+
See `rescript help`:
1717

1818
```
19-
❯ rescript -help
20-
Available flags
21-
-v, -version display version number
22-
-h, -help display help
19+
❯ rescript help
20+
Usage: rescript <options> <subcommand>
21+
22+
`rescript` is equivalent to `rescript build`
23+
24+
Options:
25+
-v, -version display version number
26+
-h, -help display help
27+
2328
Subcommands:
24-
build
25-
clean
26-
format
27-
convert
28-
help
29-
Run rescript subcommand -h for more details,
30-
For example:
31-
rescript build -h
32-
rescript format -h
33-
The default `rescript` is equivalent to `rescript build` subcommand
29+
build
30+
clean
31+
format
32+
convert
33+
dump
34+
help
35+
36+
Run `rescript <subcommand> -h` for subcommand help. Examples:
37+
rescript build -h
38+
rescript format -h
3439
```
3540

3641
## Build Project
@@ -48,7 +53,7 @@ Which is an alias for `rescript build`.
4853
To keep a build watcher, run:
4954

5055
```sh
51-
rescript build -w
56+
rescript -w
5257
```
5358

5459
Any new file change will be picked up and the build will re-run.
@@ -64,9 +69,3 @@ If you ever get into a stale build for edge-case reasons, use:
6469
```sh
6570
rescript clean
6671
```
67-
68-
This will clean your own project's build artifacts. To also clean the dependencies' artifacts:
69-
70-
```sh
71-
rescript clean -with-deps
72-
```

pages/docs/manual/latest/converting-from-js.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ReScript offers a unique project conversion methodology which:
1313

1414
## Step 1: Install ReScript
1515

16-
Run `npm install rescript` on your project, then imitate our [New Project](installation#new-project) workflow by adding a `rescript.json` at the root. Then start `npx rescript build -w`.
16+
Run `npm install rescript` on your project, then imitate our [New Project](installation#new-project) workflow by adding a `rescript.json` at the root. Then start `npx rescript -w`.
1717

1818
## Step 2: Copy Paste the Entire JS File
1919

0 commit comments

Comments
 (0)