Rename in .res to use Rescript syntax

This commit is contained in:
Quentin 2022-03-30 15:03:19 +02:00
parent f66227d9f0
commit ee31bc039b
6 changed files with 1068 additions and 3 deletions

View file

@ -13,5 +13,6 @@
} }
], ],
"suffix": ".bs.js", "suffix": ".bs.js",
"bs-dependencies": [] "reason": { "react-jsx": 3 },
"bs-dependencies": ["@rescript/react"]
} }

1050
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,11 @@
"description": "A web extension to publish content on a S3 website", "description": "A web extension to publish content on a S3 website",
"main": "src/main.bs.js", "main": "src/main.bs.js",
"type": "module", "type": "module",
"dependencies": {}, "dependencies": {
"@aws-sdk/client-s3": "^3.58.0",
"@rescript/react": "^0.10.3",
"react": "^17.0.2"
},
"devDependencies": { "devDependencies": {
"rescript": "^9.1.4", "rescript": "^9.1.4",
"webpack": "^5.70.0", "webpack": "^5.70.0",

6
src/App.res Normal file
View file

@ -0,0 +1,6 @@
@react.component
let make = () => {
<div>
{React.string("Hello ReScripters!")}
</div>
}

View file

@ -1 +0,0 @@
Js.log("hello world")

5
src/main.res Normal file
View file

@ -0,0 +1,5 @@
switch(ReactDOM.querySelector("#root")) {
| Some(root) => ReactDOM.render(<App/>, root)
| None => () // do nothing
}