Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This is the official documentation platform for the [ReScript](https://rescript-
**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript-compiler).**

**In case you are missing some specific documentation:**

- Some language / compiler feature may not be documented yet
- Create an issue to let us know what you are missing
- In case you want to contribute missing docs, please refer to our [Contribution section](#contributing)
Expand Down Expand Up @@ -42,7 +43,7 @@ open localhost:3000
In case you want to run ReScript in watchmode:

```sh
npx rescript build -w
npx rescript -w
```

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

We check the validity of our code examples marked with:
- `` ```res example `` (ReScript code snippet)
- `` ```res sig `` (signature)
- `` ```res prelude `` (ReScript code snippet available for all subsequent code snippets)

- ` ```res example ` (ReScript code snippet)
- ` ```res sig ` (signature)
- ` ```res prelude ` (ReScript code snippet available for all subsequent code snippets)

Run the checks with:

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
"remark-parse": "^10.0.2",
"remark-slug": "^5.1.2",
"remark-stringify": "^7.0.3",
"rescript": "^11.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to normal dependencies because it includes runtime as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, updated to the latest version, which supports rescript -w

"request": "^2.88.0",
"stringify-object": "^3.3.0",
"unified": "^8.4.0"
},
"scripts": {
"dev": "next",
"build": "rescript clean -with-deps && rescript && npm run update-index && next build",
"build": "rescript && npm run update-index && next build",
"test": "node scripts/test-examples.mjs && node scripts/test-hrefs.mjs",
"reanalyze": "reanalyze -all-cmt .",
"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"
Expand All @@ -61,7 +62,6 @@
"postcss": "^8.4.27",
"postcss-cli": "^8.3.0",
"reanalyze": "^2.16.0",
"rescript": "^11.0.0-rc.6",
"simple-functional-loader": "^1.2.1",
"tailwindcss": "^3.3.3"
}
Expand Down
43 changes: 21 additions & 22 deletions pages/docs/manual/latest/build-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,29 @@ Every ReScript project needs a build description file, `rescript.json`.

## Options

See `rescript -help`:
See `rescript help`:

```
❯ rescript -help
Available flags
-v, -version display version number
-h, -help display help
❯ rescript help
Usage: rescript <options> <subcommand>

`rescript` is equivalent to `rescript build`

Options:
-v, -version display version number
-h, -help display help

Subcommands:
build
clean
format
convert
help
Run rescript subcommand -h for more details,
For example:
rescript build -h
rescript format -h
The default `rescript` is equivalent to `rescript build` subcommand
build
clean
format
convert
dump
help

Run `rescript <subcommand> -h` for subcommand help. Examples:
rescript build -h
rescript format -h
```

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

```sh
rescript build -w
rescript -w
```

Any new file change will be picked up and the build will re-run.
Expand All @@ -64,9 +69,3 @@ If you ever get into a stale build for edge-case reasons, use:
```sh
rescript clean
```

This will clean your own project's build artifacts. To also clean the dependencies' artifacts:

```sh
rescript clean -with-deps
```
2 changes: 1 addition & 1 deletion pages/docs/manual/latest/converting-from-js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ReScript offers a unique project conversion methodology which:

## Step 1: Install ReScript

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`.
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`.

## Step 2: Copy Paste the Entire JS File

Expand Down