Skip to content

Commit bfda25e

Browse files
committed
update installation section
1 parent e66b5d6 commit bfda25e

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

pages/docs/manual/v12.0.0/installation.mdx

+28-26
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ canonical: "/docs/manual/v12.0.0/installation"
55
---
66

77
# Installation
8-
9-
## Notes
10-
11-
With the instructions below, our new standard library [ReScript Core](https://github.com/rescript-association/rescript-core) will be included by default. (In ReScript 11, it comes as a separate npm package `@rescript/core`. In future versions, it will be included in the `rescript` npm package itself.)
12-
138
## Prerequisites
149

15-
- [Node.js](https://nodejs.org/) version >= 14
10+
- [Node.js](https://nodejs.org/) version >= 20
1611
- One of the following package managers:
1712
- [npm](https://docs.npmjs.com/cli/) (comes with Node.js)
18-
- [yarn](https://yarnpkg.com/) (yarn versions >1 need to set `nodeLinker: node-modules` in `.yarnrc.yml`)
13+
- [yarn](https://yarnpkg.com/)
14+
- yarn versions >1 need to set `nodeLinker: node-modules` in `.yarnrc.yml`
1915
- [pnpm](https://pnpm.io/)
2016
- [bun](https://bun.sh/)
17+
- [deno]()
18+
- Configure `"nodeModulesDir": "auto"` in `deno.json`
2119

2220
## New Project
2321

24-
The fastest and easiest way to spin up a new ReScript project is with the [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) project generator. You can start it with any of the aforementioned package managers or `npx`.
22+
The fastest and easiest way to spin up a new ReScript project is with the [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) project generator. This will get you started with a fresh Next.js or Vite app with React and Tailwind CSS.
23+
24+
You can start it with any of the aforementioned package managers or `npx`.
2525

26-
<CodeTab labels={["npm", "npx", "yarn", "pnpm", "bun"]}>
26+
<CodeTab labels={["npm", "npx", "yarn", "pnpm", "bun", "deno"]}>
2727

2828
```sh example
2929
npm create rescript-app@latest
@@ -40,7 +40,9 @@ pnpm create rescript-app
4040
```sh
4141
bun create rescript-app
4242
```
43-
43+
```sh
44+
deno run -A npm:create-rescript-app@latest
45+
```
4446
</CodeTab>
4547

4648
- Follow the steps of the setup.
@@ -66,7 +68,7 @@ If you already have a JavaScript project into which you'd like to add ReScript y
6668
### Quick Setup
6769

6870
In the root directory of your project, execute:
69-
<CodeTab labels={["npm", "npx", "yarn", "pnpm", "bun"]}>
71+
<CodeTab labels={["npm", "npx", "yarn", "pnpm", "bun", "deno"]}>
7072

7173
```sh
7274
npm create rescript-app@latest
@@ -83,28 +85,34 @@ pnpm create rescript-app
8385
```sh
8486
bun create rescript-app
8587
```
86-
88+
```sh
89+
// you will need deno configured to have a package.json file and node_modules folder
90+
deno run -A npm:create-rescript-app@latest
91+
```
8792
</CodeTab>
8893

8994
`create-rescript-app` will tell you that a `package.json` file has been detected and ask you if it should install ReScript into your project. Just follow the steps accordingly.
9095

9196
### Manual Setup
9297
- Install ReScript locally:
93-
<CodeTab labels={["npm", "yarn", "pnpm", "bun"]}>
98+
<CodeTab labels={["npm", "yarn", "pnpm", "bun", "deno"]}>
9499

95100
```sh
96-
npm install rescript @rescript/core
101+
npm install rescript
97102
```
98103
```sh
99-
yarn add rescript @rescript/core
104+
yarn add rescript
100105
```
101106
```sh
102-
pnpm install rescript @rescript/core
107+
pnpm install rescript
103108
```
104109
```sh
105-
bun install rescript @rescript/core
110+
bun install rescript
111+
```
112+
```sh
113+
// you will need deno configured to have a node_modules folder
114+
deno install npm:rescript --allow-scripts
106115
```
107-
108116
</CodeTab>
109117
- Create a ReScript build configuration file (called `rescript.json`) at the root:
110118
```json
@@ -122,13 +130,7 @@ bun create rescript-app
122130
"in-source": true
123131
}
124132
],
125-
"suffix": ".res.js",
126-
"bs-dependencies": [
127-
"@rescript/core"
128-
],
129-
"bsc-flags": [
130-
"-open RescriptCore"
131-
]
133+
"suffix": ".res.js"
132134
}
133135
```
134136
See [Build Configuration](build-configuration) for more details on `rescript.json`.
@@ -140,7 +142,7 @@ bun create rescript-app
140142
}
141143
```
142144

143-
Since ReScript compiles to clean readable JS files, the rest of your existing toolchain (e.g. Babel and Webpack) should just work!
145+
Since ReScript compiles to clean readable JS files, the rest of your existing toolchain (e.g. Vite, Rspack, Rollup) should just work!
144146

145147
Helpful guides:
146148

0 commit comments

Comments
 (0)