Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Commit 385edff

Browse files
committed
chore: add examples
1 parent e02b40d commit 385edff

32 files changed

+3350
-84
lines changed

examples/react-counter/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

examples/react-counter/LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2019-2023, Ink & Switch LLC
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

examples/react-counter/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<link rel="modulepreload" href="/src/shared-worker.ts" />
7+
<title>Automerge Repo Example</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "@automerge/automerge-repo-demo-counter",
3+
"repository": "https://github.com/automerge/automerge-repo/tree/master/examples/react-counter",
4+
"private": true,
5+
"version": "1.1.0-alpha.7",
6+
"type": "module",
7+
"scripts": {
8+
"dev": "vite --open",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
"@automerge/automerge": "^2.1.9",
13+
"@automerge/automerge-repo": "^1.0.19",
14+
"@automerge/automerge-repo-network-messagechannel": "^1.0.19",
15+
"@automerge/automerge-repo-network-websocket": "^1.0.19",
16+
"@automerge/automerge-repo-react-hooks": "^1.0.19",
17+
"@automerge/automerge-repo-storage-indexeddb": "^1.0.19",
18+
"@automerge/automerge-wasm": "^0.9.0",
19+
"@vitejs/plugin-react": "^4.2.1",
20+
"react": "^18.2.0",
21+
"react-dom": "^18.2.0",
22+
"vite": "^5.0.11",
23+
"vite-plugin-wasm": "^3.3.0"
24+
}
25+
}

0 commit comments

Comments
 (0)