chore: mise dev task (#553)

This commit is contained in:
Jason Rasmussen
2026-06-02 09:38:57 -04:00
committed by GitHub
parent cdd74fe6e1
commit 81e7138631
3 changed files with 66 additions and 1 deletions
+33
View File
@@ -42,6 +42,39 @@ dir = "{{cwd}}"
run = "mise run tf destroy"
dir = "{{cwd}}"
[tasks.dev]
description = "Run a dev server"
usage = '''
arg "<app>" help="Target app" {
choices "api" "awesome" "buy" "datasets" "get" "my" "root" "ui"
default "root"
}
'''
run = [
"pnpm --filter @immich/ui --filter @immich/svelte-markdown-preprocess build",
{ task = "watch-and-open", args = ["{{usage.app}}"] }
]
[tasks."watch-and-open"]
description = "Run watch and open in parallel"
usage = '''
arg "<app>" help="Target app"
'''
depends = [ { task = "watch" }, { task = "open", args = ["{{usage.app}}"] } ]
[tasks.watch]
run = "pnpm --filter @immich/ui --filter @immich/svelte-markdown-preprocess --parallel run watch"
[tasks.open]
usage = '''
arg "<app>" help="Target app"
'''
run = [
"sleep 3",
'echo "Launching apps/{{usage.app}}.immich.app..."',
'pnpm --filter "{{usage.app}}.immich.app" start --open'
]
[settings]
experimental = true
idiomatic_version_file_enable_tools = []
+32
View File
@@ -1 +1,33 @@
# Static sites
## Structure
This repository structure is as follows
```
apps/ <-- web apps
packages/ <-- npm packages
```
## Setup
Install [Mise](https://mise.jdx.dev/installing-mise.html) and then activate it via `mise install`.
## Mise commands
This `mise dev` command watches both `packages/ui` and `packages/svelte-markdown-preprocess` for changes and rebuilds them automatically. It also launches a svelte-kit development server for the selected app, or `root.immich.app` if unspecified.
```
mise dev # launches root.immich.app
mise dev <app> # launches <app>.immich.app
# examples
mise dev api
mise dev awesome
mise dev buy
mise dev get
mise dev my
mise dev root
mise dev ui
##
```
@@ -11,7 +11,7 @@
"start": "npm run start:dev",
"build": "tsc --project ./tsconfig.json",
"test": "vitest",
"watch": "tsc --project ./tsconfig.json --watch"
"watch": "tsc --project ./tsconfig.json --watch --preserveWatchOutput"
},
"files": [
"dist",