mermaid integration
This commit is contained in:
parent
39887b3396
commit
9bca370872
|
@ -18,6 +18,7 @@ dependencies = [
|
|||
"install_mzoon",
|
||||
"init_pixi_canvas",
|
||||
"init_tauri_glue",
|
||||
"init_mermaid",
|
||||
]
|
||||
|
||||
[tasks.start]
|
||||
|
@ -27,6 +28,7 @@ run_task = { fork = true, parallel = true, name = [
|
|||
"tauri_dev_with_cleanup",
|
||||
"watch_pixi_canvas",
|
||||
"watch_tauri_glue",
|
||||
"watch_mermaid",
|
||||
]}
|
||||
|
||||
[tasks.start_browser]
|
||||
|
@ -36,6 +38,7 @@ run_task = { fork = true, parallel = true, name = [
|
|||
"mzoon_start_with_cleanup",
|
||||
"watch_pixi_canvas",
|
||||
"watch_tauri_glue",
|
||||
"watch_mermaid",
|
||||
]}
|
||||
|
||||
[tasks.start_browser_release]
|
||||
|
@ -45,6 +48,7 @@ run_task = { fork = true, parallel = true, name = [
|
|||
"mzoon_start_release_with_cleanup",
|
||||
"watch_pixi_canvas",
|
||||
"watch_tauri_glue",
|
||||
"watch_mermaid",
|
||||
]}
|
||||
|
||||
[tasks.bundle]
|
||||
|
@ -272,3 +276,47 @@ args = [
|
|||
[tasks.watch_typecheck_tauri_glue.windows]
|
||||
command = "node_modules/.bin/tsc.cmd"
|
||||
|
||||
## mermaid ##
|
||||
|
||||
[tasks.init_mermaid]
|
||||
description = "Initialize `frontend/typescript/mermaid`"
|
||||
cwd = "frontend/typescript/mermaid"
|
||||
command = "npm"
|
||||
args = ["install"]
|
||||
|
||||
[tasks.init_mermaid.windows]
|
||||
command = "npm.cmd"
|
||||
|
||||
[tasks.watch_mermaid]
|
||||
description = "Build and typescheck Typescript on change"
|
||||
run_task = { fork = true, parallel = true, name = [
|
||||
"watch_build_mermaid",
|
||||
"watch_typecheck_mermaid",
|
||||
]}
|
||||
|
||||
[tasks.watch_build_mermaid]
|
||||
description = "Compile `frontend/typescript/mermaid` on change"
|
||||
cwd = "frontend/typescript/mermaid"
|
||||
command = "node_modules/.bin/esbuild"
|
||||
args = ["mermaid.ts", "--bundle", "--outfile=../bundles/mermaid.js", "--format=esm", "--watch"]
|
||||
|
||||
[tasks.watch_build_mermaid.windows]
|
||||
command = "node_modules/.bin/esbuild.cmd"
|
||||
|
||||
[tasks.watch_typecheck_mermaid]
|
||||
description = "Typecheck `frontend/typescript/mermaid` on change"
|
||||
cwd = "frontend/typescript/mermaid"
|
||||
command = "node_modules/.bin/tsc"
|
||||
args = [
|
||||
"mermaid.ts",
|
||||
"--watch",
|
||||
"--noEmit",
|
||||
"--preserveWatchOutput",
|
||||
"--strict",
|
||||
"--target", "esnext",
|
||||
"--module", "esnext",
|
||||
"--moduleResolution", "bundler",
|
||||
]
|
||||
|
||||
[tasks.watch_typecheck_mermaid.windows]
|
||||
command = "node_modules/.bin/tsc.cmd"
|
||||
|
|
12
frontend/typescript/mermaid/README.md
Normal file
12
frontend/typescript/mermaid/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
Init
|
||||
- `npm install`
|
||||
|
||||
Watch & build (without typechecking)
|
||||
- `node_modules/.bin/esbuild mermaid.ts --bundle --outfile=../bundles/mermaid.js --format=esm --watch`
|
||||
|
||||
Watch & typecheck (without building)
|
||||
- `node_modules/.bin/tsc mermaid.ts --watch -noEmit --preserveWatchOutput --target esnext --module esnext --moduleResolution bundler`
|
||||
|
||||
Created with commands:
|
||||
- `npm i -E mermaid`
|
||||
- `npm i -D esbuild typescript`
|
3
frontend/typescript/mermaid/mermaid.ts
Normal file
3
frontend/typescript/mermaid/mermaid.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export function hello(): String {
|
||||
return "Hello from Mermaid"
|
||||
}
|
1378
frontend/typescript/mermaid/package-lock.json
generated
Normal file
1378
frontend/typescript/mermaid/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
9
frontend/typescript/mermaid/package.json
Normal file
9
frontend/typescript/mermaid/package.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"mermaid": "11.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.24.0",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ Init
|
|||
- `npm install`
|
||||
|
||||
Watch & build (without typechecking)
|
||||
-`- `node_modules/.bin/esbuild pixi_canvas.ts --bundle --outfile=../bundles/tauri_glue.js --format=esm --watch``
|
||||
- `node_modules/.bin/esbuild tauri_glue.ts --bundle --outfile=../bundles/tauri_glue.js --format=esm --watch`
|
||||
|
||||
Watch & typecheck (without building)
|
||||
- `node_modules/.bin/tsc tauri_glue.ts --watch -noEmit --preserveWatchOutput --target esnext --module esnext --moduleResolution bundler`
|
||||
|
|
Loading…
Reference in a new issue