bubbles / commit
Deploy to apps.fuzzyworld.net with fuzzyworld-tools
README.md | 19 +++++++++++-------- index.html | 4 ++-- package.json | 12 +++++++++++- pnpm-lock.yaml | 11 +++++++++++ vite.config.ts | 5 +++-- 5 files changed, 38 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 49036c1..7bf3e13 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ Your phone is a glass of water. Tilt to slosh. Tap to drop things in. Some float. Some sink. -**Live demo:** https://pavelsafronov.gitlab.io/bubbles +**Live demo:** https://apps.fuzzyworld.net/bubbles/ -**Repository:** https://gitlab.com/PavelSafronov/bubbles +**Repository:** https://code.fuzzyworld.net/bubbles/ (`git clone https://code.fuzzyworld.net/bubbles.git`) --- @@ -43,7 +43,7 @@ Max 12 objects at a time — the oldest is removed when you add a 13th. - TypeScript + Canvas 2D API (no framework, no WebGL) - Vite for bundling - pnpm for package management -- [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/) for hosting (static, no server) +- Static hosting at apps.fuzzyworld.net (no server) Physics: - 1-D column wave simulation (80 columns, spring-coupled) @@ -69,20 +69,23 @@ pnpm dev pnpm build ``` -Output goes to `dist/`. GitLab CI moves it to `public/` for Pages. +Output goes to `dist/`. --- ## Deploy -Push to `main` on GitLab. The CI pipeline (`.gitlab-ci.yml`) runs automatically: +```bash +pnpm run deploy +``` + +`fw deploy` (from [fuzzyworld-tools](https://code.fuzzyworld.net/fuzzyworld-tools/)) builds a fresh clone of `main`: ``` -pnpm install → pnpm gen-assets → pnpm build → mv dist public +pnpm install → pnpm gen-assets → pnpm build → upload dist/ ``` -The `public/` artifact is served by GitLab Pages at -https://pavelsafronov.gitlab.io/bubbles +and publishes it at https://apps.fuzzyworld.net/bubbles/ --- diff --git a/index.html b/index.html index 3ed6807..f2a6260 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ <meta property="og:title" content="Bubbles" /> <meta property="og:description" content="Your phone is a glass of water. Tilt to slosh. Tap to drop things in." /> <meta property="og:image" content="og-image.png" /> - <meta property="og:url" content="https://pavelsafronov.gitlab.io/bubbles" /> + <meta property="og:url" content="https://apps.fuzzyworld.net/bubbles/" /> <meta property="og:type" content="website" /> <title>Bubbles</title> <link rel="icon" type="image/x-icon" href="favicon.ico" /> @@ -247,7 +247,7 @@ <div id="level-dots"></div> <p id="hint">tap to drop · tilt to slosh · swipe to switch</p> <footer> - <a href="https://gitlab.com/PavelSafronov/bubbles" target="_blank" rel="noopener">gitlab</a> + <a href="https://code.fuzzyworld.net/bubbles/" target="_blank" rel="noopener">source</a> · wind icon by <a href="https://www.flaticon.com/authors/icongeek26" target="_blank" rel="noopener">Icongeek26</a> diff --git a/package.json b/package.json index 03cb05b..e028e00 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,13 @@ "dev": "vite --host", "build": "tsc --noEmit && vite build", "preview": "vite preview", - "gen-assets": "tsx scripts/generate-assets.ts" + "gen-assets": "tsx scripts/generate-assets.ts", + "deploy": "fw deploy" }, "devDependencies": { "@types/node": "^22.0.0", "@types/qrcode": "^1.5.6", + "fuzzyworld-tools": "git+https://code.fuzzyworld.net/fuzzyworld-tools.git#v1", "sharp": "^0.33.5", "tsx": "^4.19.2", "typescript": "^5.7.3", @@ -20,5 +22,13 @@ }, "dependencies": { "qrcode": "^1.5.4" + }, + "fuzzyworld": { + "app": "bubbles", + "title": "Bubbles", + "description": "Your phone is a glass of water. Tilt to slosh. Tap to drop things in.", + "prebuild": [ + "pnpm gen-assets" + ] } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a171847..3026f07 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,6 +18,9 @@ importers: '@types/qrcode': specifier: ^1.5.6 version: 1.5.6 + fuzzyworld-tools: + specifier: git+https://code.fuzzyworld.net/fuzzyworld-tools.git#v1 + version: git+https://code.fuzzyworld.net/fuzzyworld-tools.git#f9ca0752208e0eda12fb21a62b22c6653beb19a8 sharp: specifier: ^0.33.5 version: 0.33.5 @@ -686,6 +689,12 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + fuzzyworld-tools@git+https://code.fuzzyworld.net/fuzzyworld-tools.git#f9ca0752208e0eda12fb21a62b22c6653beb19a8: + resolution: {commit: f9ca0752208e0eda12fb21a62b22c6653beb19a8, repo: https://code.fuzzyworld.net/fuzzyworld-tools.git, type: git} + version: 1.0.0 + engines: {node: '>=18'} + hasBin: true + get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -1304,6 +1313,8 @@ snapshots: fsevents@2.3.3: optional: true + fuzzyworld-tools@git+https://code.fuzzyworld.net/fuzzyworld-tools.git#f9ca0752208e0eda12fb21a62b22c6653beb19a8: {} + get-caller-file@2.0.5: {} get-tsconfig@4.13.7: diff --git a/vite.config.ts b/vite.config.ts index 89a1462..1eaab8c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,10 @@ import { defineConfig } from 'vite'; import { qrcode } from 'vite-plugin-qrcode'; +import fuzzyworld from 'fuzzyworld-tools/vite'; export default defineConfig({ - plugins: [qrcode()], - base: '/bubbles/', + // fuzzyworld() sets base to /bubbles/ (from package.json) for apps.fuzzyworld.net. + plugins: [qrcode(), fuzzyworld()], publicDir: 'static', build: { outDir: 'dist',