@automerge/create-vite-app 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -0
- package/package.json +2 -2
- package/template/.github/workflows/deploy.yml +51 -0
- package/template/index.html +11 -13
- package/template/package.json +8 -8
- package/template/src/App.tsx +2 -4
package/dist/index.js
CHANGED
|
@@ -29,6 +29,32 @@ function main() {
|
|
|
29
29
|
const pkg = JSON.parse(fs.readFileSync(path.join(templateDir, `package.json`), "utf-8"));
|
|
30
30
|
pkg.name = projectName;
|
|
31
31
|
write("package.json", JSON.stringify(pkg, null, 2));
|
|
32
|
+
write(".gitignore", `
|
|
33
|
+
# Logs
|
|
34
|
+
logs
|
|
35
|
+
*.log
|
|
36
|
+
npm-debug.log*
|
|
37
|
+
yarn-debug.log*
|
|
38
|
+
yarn-error.log*
|
|
39
|
+
pnpm-debug.log*
|
|
40
|
+
lerna-debug.log*
|
|
41
|
+
|
|
42
|
+
node_modules
|
|
43
|
+
dist
|
|
44
|
+
dist-ssr
|
|
45
|
+
*.local
|
|
46
|
+
|
|
47
|
+
# Editor directories and files
|
|
48
|
+
.vscode/*
|
|
49
|
+
!.vscode/extensions.json
|
|
50
|
+
.idea
|
|
51
|
+
.DS_Store
|
|
52
|
+
*.suo
|
|
53
|
+
*.ntvs*
|
|
54
|
+
*.njsproj
|
|
55
|
+
*.sln
|
|
56
|
+
*.sw?
|
|
57
|
+
`);
|
|
32
58
|
execSync(`cd ${projectName} && npm install`, { stdio: "inherit" });
|
|
33
59
|
}
|
|
34
60
|
main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automerge/create-vite-app",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Create an automerge-repo app which uses Vite",
|
|
5
5
|
"repository": "https://github.com/automerge/automerge-repo/tree/master/packages/create-vite-app",
|
|
6
6
|
"author": "Alex Good <alex@memoryandthought.me>",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "64edfaea5e53e77cd9158fc1df52fea85801db71"
|
|
23
23
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Simple workflow for deploying static content to GitHub Pages
|
|
2
|
+
name: Deploy static content to Pages
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
# Runs on pushes targeting the default branch
|
|
6
|
+
push:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
pages: write
|
|
16
|
+
id-token: write
|
|
17
|
+
|
|
18
|
+
# Allow one concurrent deployment
|
|
19
|
+
concurrency:
|
|
20
|
+
group: "pages"
|
|
21
|
+
cancel-in-progress: true
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
# Single deploy job since we're just deploying
|
|
25
|
+
deploy:
|
|
26
|
+
environment:
|
|
27
|
+
name: github-pages
|
|
28
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout
|
|
32
|
+
uses: actions/checkout@v4
|
|
33
|
+
- name: Set up Node
|
|
34
|
+
uses: actions/setup-node@v4
|
|
35
|
+
with:
|
|
36
|
+
node-version: 20
|
|
37
|
+
cache: "npm"
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: yarn
|
|
40
|
+
- name: Build
|
|
41
|
+
run: yarn build
|
|
42
|
+
- name: Setup Pages
|
|
43
|
+
uses: actions/configure-pages@v4
|
|
44
|
+
- name: Upload artifact
|
|
45
|
+
uses: actions/upload-pages-artifact@v3
|
|
46
|
+
with:
|
|
47
|
+
# Upload dist folder
|
|
48
|
+
path: "./dist"
|
|
49
|
+
- name: Deploy to GitHub Pages
|
|
50
|
+
id: deployment
|
|
51
|
+
uses: actions/deploy-pages@v4
|
package/template/index.html
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Meet Automerge</title>
|
|
8
|
+
</head>
|
|
3
9
|
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<title>Meet Automerge</title>
|
|
9
|
-
</head>
|
|
10
|
-
|
|
11
|
-
<body>
|
|
12
|
-
<div id="root"></div>
|
|
13
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
14
|
-
</body>
|
|
15
|
-
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
13
|
+
</body>
|
|
16
14
|
</html>
|
package/template/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectName",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@automerge/automerge": "^2.1.11",
|
|
14
|
-
"@automerge/automerge-repo": "^1.1.
|
|
15
|
-
"@automerge/automerge-repo-network-broadcastchannel": "^1.1.
|
|
16
|
-
"@automerge/automerge-repo-network-websocket": "^1.1.
|
|
17
|
-
"@automerge/automerge-repo-react-hooks": "^1.1.
|
|
18
|
-
"@automerge/automerge-repo-storage-indexeddb": "^1.1.
|
|
14
|
+
"@automerge/automerge-repo": "^1.1.5",
|
|
15
|
+
"@automerge/automerge-repo-network-broadcastchannel": "^1.1.5",
|
|
16
|
+
"@automerge/automerge-repo-network-websocket": "^1.1.5",
|
|
17
|
+
"@automerge/automerge-repo-react-hooks": "^1.1.5",
|
|
18
|
+
"@automerge/automerge-repo-storage-indexeddb": "^1.1.5",
|
|
19
19
|
"react": "^18.2.0",
|
|
20
20
|
"react-dom": "^18.2.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/react": "^18.2.64",
|
|
24
24
|
"@types/react-dom": "^18.2.21",
|
|
25
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
26
|
-
"@typescript-eslint/parser": "^7.
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
26
|
+
"@typescript-eslint/parser": "^7.3.1",
|
|
27
27
|
"@vitejs/plugin-react": "^4.2.1",
|
|
28
28
|
"eslint": "^8.57.0",
|
|
29
29
|
"eslint-plugin-react-hooks": "^4.6.0",
|
package/template/src/App.tsx
CHANGED
|
@@ -20,12 +20,10 @@ function App({ docUrl }: { docUrl: AutomergeUrl }) {
|
|
|
20
20
|
</div>
|
|
21
21
|
<h1>Meet Automerge</h1>
|
|
22
22
|
<div className="card">
|
|
23
|
-
<button onClick={() => changeDoc(
|
|
23
|
+
<button onClick={() => changeDoc(d => d.counter.increment(1))}>
|
|
24
24
|
count is {doc && doc.counter.value}
|
|
25
25
|
</button>
|
|
26
|
-
<p>
|
|
27
|
-
Open this page in another tab to watch the updates synchronize
|
|
28
|
-
</p>
|
|
26
|
+
<p>Open this page in another tab to watch the updates synchronize</p>
|
|
29
27
|
</div>
|
|
30
28
|
<p className="read-the-docs">
|
|
31
29
|
Built with Automerge, Vite, React, and TypeScript
|