mirror of
https://github.com/immich-app/static-pages.git
synced 2026-09-30 13:23:05 +08:00
chore: mise dev task (#553)
This commit is contained in:
@@ -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 = []
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user