Skip to content

Commit

Permalink
1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioCoser committed Mar 29, 2024
1 parent a39c451 commit 0d44c7c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 20 deletions.
28 changes: 28 additions & 0 deletions examples/cdn-package/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://github.com/AlessioCoser/doom-reactive-state/releases/download/0.6.2/doom-reactive-state.global.js"></script>
</head>
<body>
<script type="application/javascript">
const Div = doom.Div
const Button = doom.Button
const signal = doom.signal
const derive = doom.derive
const d = doom.d

function App() {
var [counter, setCounter] = signal(1)

var onclick = () => setCounter(counter() + 1)

return Div([
Div(d`${counter}`),
Button({ className: "pippo", onclick }, "Increment")
])
}

document.body.appendChild(App());
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions examples/cdn-package/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# doom-reactive-state Example: Load the script directly from a cdn

Open the file `index.html` on the browser
3 changes: 2 additions & 1 deletion examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

- [simple-counter-javascript](./simple-counter-javascript/)
- [async-counter-typescript](./async-counter-typescript/)
- [reactive-state-nodejs](./reactive-state-nodejs/)
- [reactive-state-nodejs](./reactive-state-nodejs/)
- [cdn-package](./rcdn-package/)
20 changes: 1 addition & 19 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<script src="./cdn/index.global.js"></script>
<script defer type="module" src="./index.ts"></script>
</head>
<body>
<script type="application/javascript">
const Div = doom.Div
const Button = doom.Button
const signal = doom.signal
const derive = doom.derive
const d = doom.d

function App() {
var [counter, setCounter] = signal(1)
var onclick = () => setCounter(counter() + 1)

return Div([
Div(d`${counter}`),
Button({ className: "pippo", onclick }, () => "Increment")
])
}
document.body.appendChild(App());
</script>
</body>
</html>

0 comments on commit 0d44c7c

Please sign in to comment.