Rename in .res to use Rescript syntax
This commit is contained in:
parent
f66227d9f0
commit
ee31bc039b
6 changed files with 1068 additions and 3 deletions
|
@ -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
1050
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -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
6
src/App.res
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
@react.component
|
||||||
|
let make = () => {
|
||||||
|
<div>
|
||||||
|
{React.string("Hello ReScripters!")}
|
||||||
|
</div>
|
||||||
|
}
|
|
@ -1 +0,0 @@
|
||||||
Js.log("hello world")
|
|
5
src/main.res
Normal file
5
src/main.res
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
switch(ReactDOM.querySelector("#root")) {
|
||||||
|
| Some(root) => ReactDOM.render(<App/>, root)
|
||||||
|
| None => () // do nothing
|
||||||
|
}
|
Loading…
Reference in a new issue