Compare commits

...

12 Commits

Author SHA1 Message Date
Julien Calixte
7a3dc1a47c chore: bump version to 1.0.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 01:03:56 +01:00
Julien Calixte
570f605ac7 fix: restore forced install phase for linux native bindings
supportedArchitectures alone is not sufficient; force reinstall is
needed to fetch the correct linux binding at build time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:59:39 +01:00
Julien Calixte
da0231b427 i18n: better name 2026-03-15 00:57:38 +01:00
Julien Calixte
9c49abfff2 fix: swap open url and copy url button order
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:45:28 +01:00
Julien Calixte
3b9b26f993 feat: add hint to shrink window to hide config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:40:48 +01:00
Julien Calixte
1d43b87836 feat: add open url button to open countdown link in new tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:36:58 +01:00
Julien Calixte
d184a8339c chore: remove custom install phase, nixpacks default is sufficient
supportedArchitectures in package.json ensures the linux binding is in
the lockfile, so a standard frozen install now works correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:34:48 +01:00
Julien Calixte
bf9f27068d fix: force pnpm install to bypass cached store missing linux binding
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:33:24 +01:00
Julien Calixte
e4fb05aa27 fix: include linux-x64 in pnpm supportedArchitectures for rolldown binding
Ensures @rolldown/binding-linux-x64-gnu is fetched even when installing
on a non-linux host, fixing the nixpacks Docker build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:31:36 +01:00
Julien Calixte
251ffa2e1a fix: add install phase with --no-frozen-lockfile for linux native bindings
rolldown requires platform-specific bindings (@rolldown/binding-linux-x64-gnu)
that are absent from a lockfile generated on a different OS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:29:14 +01:00
Julien Calixte
2986a5d0fe fix: use nodejs_23 for vite 8 compatibility
Vite 8 requires Node.js 20.19+ or 22.12+; nodejs_22 in nixpkgs resolves to 22.11.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:25:46 +01:00
Julien Calixte
025cf4072e add nixpacks config and update dependencies
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 00:22:10 +01:00
6 changed files with 994 additions and 911 deletions

1
.node-version Normal file
View File

@@ -0,0 +1 @@
v23

View File

@@ -1,18 +1,40 @@
# Vue 3 + TypeScript + Vite
# miniminu - the milestone reminder
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
A minimal countdown timer app. Set a target date and watch the time remaining displayed in years, months, days, hours, minutes, and seconds.
## Recommended IDE Setup
## Features
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
- Countdown to any target date
- Optional project title (shown as page title)
- Shareable URL — state is stored in query params (`?project=...&target=...`)
- Responsive: form controls are hidden on small screens, visible on 600px+
## Type Support For `.vue` Imports in TS
## Usage
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
Open the app in a browser. On a wide enough screen, fill in the **Title** and **Target date** fields, then click **copy url** to share a link with the countdown pre-configured.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
URL params:
- `project` — display name / page title
- `target` — target date in `YYYY-MM-DD` format
1. Disable the built-in TypeScript Extension
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
## Development
```bash
pnpm install
pnpm dev
```
## Build
```bash
pnpm build
pnpm preview
```
## Tech stack
- [Vue 3](https://vuejs.org/) with `<script setup>` SFCs
- [TypeScript](https://www.typescriptlang.org/)
- [Vite 8](https://vite.dev/)
- [Luxon](https://moment.github.io/luxon/) for date/time calculations
- [VueUse](https://vueuse.org/) for URL search params and title sync

8
nixpacks.toml Normal file
View File

@@ -0,0 +1,8 @@
[phases.setup]
nixPkgs = ["nodejs_23", "pnpm"]
[phases.install]
cmds = ["pnpm install --no-frozen-lockfile --force"]
[phases.build]
cmds = ["pnpm build"]

View File

@@ -1,7 +1,7 @@
{
"name": "miniminu",
"private": true,
"version": "0.0.0",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
@@ -10,17 +10,24 @@
"test": "vitest"
},
"dependencies": {
"@vueuse/core": "^9.13.0",
"luxon": "^3.3.0",
"vue": "^3.2.45",
"@vueuse/core": "^14.2.1",
"luxon": "^3.7.2",
"vue": "^3.5.30",
"vue-router": "4"
},
"pnpm": {
"supportedArchitectures": {
"os": ["current", "linux"],
"cpu": ["current", "x64"],
"libc": ["current", "glibc"]
}
},
"devDependencies": {
"@types/luxon": "^3.2.0",
"@vitejs/plugin-vue": "^4.0.0",
"typescript": "^4.9.3",
"vite": "^4.1.0",
"vitest": "^0.29.2",
"vue-tsc": "^1.0.24"
"@types/luxon": "^3.7.1",
"@vitejs/plugin-vue": "^6.0.5",
"typescript": "^5.9.3",
"vite": "^8.0.0",
"vitest": "^4.1.0",
"vue-tsc": "^3.2.5"
}
}

1801
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@ import { useTimeUntil } from "../hooks/useTimeUntil.hooks"
const props = defineProps<{ project?: string; target?: string }>()
const searchParams = useUrlSearchParams<{ project?: string; target?: string }>(
"history"
"history",
)
const projectTitle = ref(props.project)
@@ -18,7 +18,7 @@ watch(
},
{
immediate: true,
}
},
)
watch(
@@ -28,7 +28,7 @@ watch(
},
{
immediate: true,
}
},
)
const target = computed(() => targetInput.value)
@@ -42,7 +42,7 @@ const targetDate = computed(() =>
? new Date(targetInput.value).toLocaleDateString(undefined, {
dateStyle: "long",
})
: null
: null,
)
const {
@@ -129,7 +129,7 @@ const copyUrl = () => {
/>
</div>
<div>
<label for="target">Target date:</label>
<label for="target">Milestone:</label>
<input
type="date"
id="target"
@@ -138,8 +138,12 @@ const copyUrl = () => {
/>
</div>
<div>
<a :href="url" target="_blank" rel="noopener noreferrer"
><button type="button">open url</button></a
>
<button @click="copyUrl">copy url</button>
</div>
<p class="hint">Shrink the window to hide this config.</p>
</form>
</div>
</template>
@@ -207,4 +211,12 @@ input {
display: flex;
}
}
.hint {
font-size: 0.75rem;
opacity: 0.5;
width: 100%;
text-align: center;
margin: 0;
}
</style>