Skip to content

Commit 0559a42

Browse files
authored
update installation section (#1030)
* update installation section * Update installation.mdx * remove deno from create-rescript-app for now
1 parent 4b4ea15 commit 0559a42

File tree

1 file changed

+19
-24
lines changed

1 file changed

+19
-24
lines changed

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

+19-24
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ 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](http://deno.com/)
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

2626
<CodeTab labels={["npm", "npx", "yarn", "pnpm", "bun"]}>
2727

@@ -40,7 +40,6 @@ pnpm create rescript-app
4040
```sh
4141
bun create rescript-app
4242
```
43-
4443
</CodeTab>
4544

4645
- Follow the steps of the setup.
@@ -83,28 +82,30 @@ pnpm create rescript-app
8382
```sh
8483
bun create rescript-app
8584
```
86-
8785
</CodeTab>
8886

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

9189
### Manual Setup
9290
- Install ReScript locally:
93-
<CodeTab labels={["npm", "yarn", "pnpm", "bun"]}>
91+
<CodeTab labels={["npm", "yarn", "pnpm", "bun", "deno"]}>
9492

9593
```sh
96-
npm install rescript @rescript/core
94+
npm install rescript
9795
```
9896
```sh
99-
yarn add rescript @rescript/core
97+
yarn add rescript
10098
```
10199
```sh
102-
pnpm install rescript @rescript/core
100+
pnpm install rescript
103101
```
104102
```sh
105-
bun install rescript @rescript/core
103+
bun install rescript
104+
```
105+
```sh
106+
// you will need deno configured to have a node_modules folder
107+
deno install npm:rescript --allow-scripts
106108
```
107-
108109
</CodeTab>
109110
- Create a ReScript build configuration file (called `rescript.json`) at the root:
110111
```json
@@ -122,13 +123,7 @@ bun create rescript-app
122123
"in-source": true
123124
}
124125
],
125-
"suffix": ".res.js",
126-
"bs-dependencies": [
127-
"@rescript/core"
128-
],
129-
"bsc-flags": [
130-
"-open RescriptCore"
131-
]
126+
"suffix": ".res.js"
132127
}
133128
```
134129
See [Build Configuration](build-configuration) for more details on `rescript.json`.
@@ -140,7 +135,7 @@ bun create rescript-app
140135
}
141136
```
142137

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

145140
Helpful guides:
146141

0 commit comments

Comments
 (0)