Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
78bc6b5
ReScript 11 scaffolding
fhammerschmidt Oct 5, 2023
959daba
Adapt some pages to ReScript 11 including records and variants (#730)
fhammerschmidt Oct 23, 2023
1bf628f
Variant docs (#740)
zth Nov 2, 2023
7652943
dynamic imports docs (#741)
zth Nov 3, 2023
2f5401f
Adapt example tests to Rescript11 + uncurried + RescriptCore (#735)
fhammerschmidt Nov 11, 2023
4ff8046
Adapt some pages to ReScript 11 including records and variants
fhammerschmidt Oct 20, 2023
03a701f
Some better wordings
fhammerschmidt Oct 22, 2023
8000d9d
Adapt example tests to Rescript11 + uncurried + RescriptCore
fhammerschmidt Oct 23, 2023
bced3de
Consistent quotes
fhammerschmidt Nov 2, 2023
f782eae
Remove old bs migration guide from latest docs
fhammerschmidt Nov 12, 2023
d3b9774
remove unsafe string interpolation
aspeddro Oct 25, 2023
f732f3f
Automate playground compiler (#695)
aspeddro Oct 28, 2023
4061a3a
Playground: auto-open @rescript/core when loaded
fhammerschmidt Oct 17, 2023
5fdac64
Take compiler api V4 into account
fhammerschmidt Oct 31, 2023
1cf12d8
Actually set open_modules in compiler config
fhammerschmidt Oct 31, 2023
2d2151a
Guard open modules with api version >= 4
fhammerschmidt Nov 1, 2023
65f27fa
remove atom editor
JiaeK Jan 2, 2023
baae0d6
Fix merge conflict
fhammerschmidt Nov 14, 2023
179c984
Update node to 18 to fix build
fhammerschmidt Nov 14, 2023
362684e
Escaping fixes
fhammerschmidt Nov 14, 2023
183becd
Snapshot v10 api docs
fhammerschmidt Nov 14, 2023
65d4032
Uncurried Mode docs
fhammerschmidt Nov 14, 2023
e5a8ce4
rescript.json
fhammerschmidt Nov 14, 2023
84b356b
Merge pull request #747 from fhammerschmidt/rescript-json
fhammerschmidt Nov 14, 2023
233bf6b
Merge pull request #748 from fhammerschmidt/uncurried-mode-docs
fhammerschmidt Nov 14, 2023
76c97c2
Add v0.12 rescript-react docs
fhammerschmidt Nov 14, 2023
eb842b1
rescript.json in react docs
fhammerschmidt Nov 14, 2023
b28de11
Merge pull request #744 from fhammerschmidt/remove-migrate-from-bs
fhammerschmidt Nov 14, 2023
e118747
Remove uncurried chapter and update existing docs to uncurried
fhammerschmidt Nov 14, 2023
76713c7
Add references to @@uncurried in syntax lookup
fhammerschmidt Nov 15, 2023
f1b025f
Fixes according comments
fhammerschmidt Nov 15, 2023
4d7cc30
Merge pull request #750 from rescript-association/uncurried-docs
fhammerschmidt Nov 15, 2023
02d0fc4
Add 'site-under-construction' banner to latest doc layouts
fhammerschmidt Nov 30, 2023
e638fad
Use correct rescript-react version in banner
fhammerschmidt Nov 30, 2023
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
2 changes: 1 addition & 1 deletion _blogposts/2020-08-10-bucklescript-is-rebranding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ There's no dedicated name for the syntax anymore. It's simply called the ReScrip

**Will there be a migration script to gradually convert our code to the new syntax?**

Yes. See our [migration page](/docs/manual/latest/migrate-from-bucklescript-reason). You can mix and match old and new code for a smoother transition.
Yes. See our [migration page](/docs/manual/v10.0.0/migrate-from-bucklescript-reason). You can mix and match old and new code for a smoother transition.

**Will BuckleScript (now ReScript) break my existing code?**

Expand Down
1 change: 1 addition & 0 deletions compilers/dummy/Dummy.res
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Console.log("I am a dummy file")
Copy link
Member

Choose a reason for hiding this comment

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

what's this about?

Copy link
Member Author

Choose a reason for hiding this comment

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

I needed a dummy ReScript project to get a compiled version of ReScript Core in the test-examples.mjs script.
When you delete the dummy file and try to execute the script without node_modules installed, it will fail

55 changes: 55 additions & 0 deletions compilers/package-lock.json

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

4 changes: 3 additions & 1 deletion compilers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@rescript/core": "^0.5.0",
"rescript-820": "npm:bs-platform@8.2.0",
"rescript-902": "npm:bs-platform@9.0.2",
"rescript-912": "npm:rescript@9.1.2",
"rescript-1000": "npm:rescript@10.0.0",
"rescript-1010": "npm:rescript@10.1.0-rc.4"
"rescript-1010": "npm:rescript@10.1.0-rc.4",
"rescript-1100": "npm:rescript@11.0.0-rc.4"
}
}
13 changes: 13 additions & 0 deletions compilers/rescript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "dummy",
"sources": {
"dir": "dummy",
"subdirs": true
},
"bs-dependencies": [
"@rescript/core"
],
"bsc-flags": [
"-open RescriptCore"
]
}
1 change: 0 additions & 1 deletion data/sidebar_manual_latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"introduction",
"installation",
"editor-plugins",
"migrate-from-bucklescript-reason",
"try"
],
"Language Features": [
Expand Down
75 changes: 75 additions & 0 deletions data/sidebar_manual_v1000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"Overview": [
"introduction",
"installation",
"editor-plugins",
"migrate-from-bucklescript-reason",
"try"
],
"Language Features": [
"overview",
"let-binding",
"type",
"primitive-types",
"tuple",
"record",
"object",
"variant",
"polymorphic-variant",
"null-undefined-option",
"array-and-list",
"function",
"control-flow",
"pipe",
"pattern-matching-destructuring",
"mutation",
"jsx",
"exception",
"lazy-values",
"promise",
"async-await",
"module",
"import-export",
"attribute",
"unboxed",
"reserved-keywords"
],
"Advanced Features": [
"extensible-variant",
"scoped-polymorphic-types"
],
"JavaScript Interop": [
"interop-cheatsheet",
"embed-raw-javascript",
"shared-data-types",
"external",
"bind-to-js-object",
"bind-to-js-function",
"import-from-export-to-js",
"bind-to-global-js-values",
"json",
"inlining-constants",
"use-illegal-identifier-names",
"generate-converters-accessors",
"browser-support-polyfills",
"libraries"
],
"Build System": [
"build-overview",
"build-configuration",
"build-configuration-schema",
"build-external-stdlib",
"build-pinned-dependencies",
"interop-with-js-build-systems",
"build-performance",
"warning-numbers"
],
"Guides": [
"converting-from-js"
],
"Extra": [
"newcomer-examples",
"project-structure",
"faq"
]
}
31 changes: 31 additions & 0 deletions data/sidebar_react_v0110.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"Overview": [
"introduction",
"installation",
"migrate-react"
],
"Main Concepts": [
"elements-and-jsx",
"rendering-elements",
"components-and-props",
"arrays-and-keys",
"refs-and-the-dom",
"context",
"styling",
"router"
],
"Hooks & State Management": [
"hooks-overview",
"hooks-effect",
"hooks-state",
"hooks-reducer",
"hooks-context",
"hooks-ref",
"hooks-custom"
],
"Guides": [
"beyond-jsx",
"forwarding-refs",
"extensions-of-props"
]
}
2 changes: 1 addition & 1 deletion misc_docs/syntax/decorator_react_component.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You will need this decorator whenever you want to use a ReScript / React compone


> **Note**
> The `@react.component` decorator requires the [react-jsx or jsx config](/docs/react/latest/installation) to be set in your `bsconfig.json` to enable the required React transformations.
> The `@react.component` decorator requires the [react-jsx or jsx config](/docs/react/latest/installation) to be set in your `rescript.json` to enable the required React transformations.

### Example

Expand Down
22 changes: 22 additions & 0 deletions misc_docs/syntax/decorator_uncurried.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: "uncurried-decorator"
keywords: ["uncurried", "decorator"]
name: "@@uncurried"
summary: "This is the `@@uncurried` decorator."
category: "decorators"
---

If you have uncurried mode turned off in `rescript.json` and still want to try it on a per-file basis, you can turn it on via

```rescript
@@uncurried
```

at the top of a `.res` file.

_Available since ReScript `11.0.0`._

### References

- [Uncurried Mode blogpost](/blog/uncurried-mode)
- [Build System configuration](/docs/manual/latest/build-configuration#uncurried)
5 changes: 5 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ const config = {
destination: "/blog/bucklescript-is-rebranding",
permanent: true,
},
{
source: "/docs/manual/latest/migrate-from-bucklescript-reason",
destination: "/docs/manual/v10.0.0/migrate-from-bucklescript-reason",
permanent: true,
},
];
},
};
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Patrick Ecker <ryyppy@users.noreply.github.com>",
"license": "MIT",
"engines": {
"node": "16.x"
"node": "18.x"
},
"type": "module",
"postcss": {
Expand Down
1 change: 1 addition & 0 deletions pages/api/revalidate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { handler as default } from "src/others/Revalidate.mjs";
6 changes: 3 additions & 3 deletions pages/docs/gentype/latest/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm install gentype --save-dev
npx gentype --help
```

Add a `gentypeconfig` section to your `bsconfig.json` (See [Configuration](#configuration) for details):
Add a `gentypeconfig` section to your `rescript.json` (See [Configuration](#configuration) for details):

```
"gentypeconfig": {
Expand All @@ -35,7 +35,7 @@ Add a `gentypeconfig` section to your `bsconfig.json` (See [Configuration](#conf
## Configuration

Every `genType` powered project requires a configuration item `"gentypeconfig"`
at top level in the project's `bsconfig.json`. The configuration has following
at top level in the project's `rescript.json`. The configuration has following
structure:

```js
Expand Down Expand Up @@ -67,7 +67,7 @@ structure:

A shim is a TS file that provides user-provided definitions for library types.

Configure your shim files within `"gentypeconfig"` in your [`bsconfig.json`](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/bsconfig.json), and add relevant `.shims.ts` files in a directory which is visible by ReScript e.g. [`src/shims/`](https://github.com/rescript-lang/rescript-compiler/tree/master/jscomp/gentype_tests/typescript-react-example/src/shims). An example shim to export ReactEvent can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/shims/ReactEvent.shim.ts).
Configure your shim files within `"gentypeconfig"` in your [`rescript.json`](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/rescript.json), and add relevant `.shims.ts` files in a directory which is visible by ReScript e.g. [`src/shims/`](https://github.com/rescript-lang/rescript-compiler/tree/master/jscomp/gentype_tests/typescript-react-example/src/shims). An example shim to export ReactEvent can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/shims/ReactEvent.shim.ts).

## Testing the Whole Setup

Expand Down
2 changes: 1 addition & 1 deletion pages/docs/manual/latest/api/belt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you want to open Belt globally for all files in your project instead, you can
"bsc-flags": ["-open Belt"],
```

into your `bsconfig.json`.
into your `rescript.json`.

**Note**: this is the **only** `open` we encourage.

Expand Down
Loading