Skip to content

Commit 71e7a6a

Browse files
authored
rename Prelude to Base and split Base.Types (#254)
* add a script to create the subpackages * move to @rescript-webapi npm namespace * remove unused JS files * split Prelude.Types into multiple files * bring back tests * format * rename prelude to base * disable warning 30 * format
1 parent d442623 commit 71e7a6a

157 files changed

Lines changed: 1598 additions & 1428 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/content/docs/contributing/api-modelling.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ mutable fillStyle: fillStyle
8888
When we wish to read and write the `fillStyle` property, we can use a helper module to lift the type to an actual ReScript variant:
8989

9090
export const fillStyleModule = `
91-
open Prelude
92-
open CanvasAPI
93-
open DOMAPI
91+
open WebApiCanvas
92+
open WebApiDOM
9493
9594
external fromString: string => fillStyle = "%identity"
9695
external fromCanvasGradient: canvasGradient => fillStyle = "%identity"

docs/content/docs/philosophy.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ let element: element = document->Document.createElement( ~localName = "div")
5050
let node: node = element->Element.asNode
5151
```
5252

53-
Any other conversions can be performed using the `Prelude.unsafeConversation` helper. This should be done with caution, as it can lead to runtime errors.
53+
Any other conversions can be performed using the `Base.unsafeConversation` helper. This should be done with caution, as it can lead to runtime errors.
5454

5555
```ReScript
5656
open WebAPI
5757
5858
let element: element = document->Document.createElement( ~localName = "div")
5959
// This is potentially unsafe, as the type system cannot guarantee the conversion
60-
let divElement: htmlDivElement = element->Prelude.unsafeConversation
60+
let divElement: htmlDivElement = element->Base.unsafeConversation
6161
```

0 commit comments

Comments
 (0)