-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmise.toml
97 lines (76 loc) · 2.39 KB
/
mise.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[tools]
deno = "2.1.6"
rust = { version = "1.78.0", postinstall = "rustup component add rustfmt clippy" }
[settings]
experimental = true
[tasks."ci:install-deps"]
description = "Install CI dependencies (only runs on CI)"
run = """
{% if env.CI and os() == "linux" %}
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev
{% endif %}
"""
[tasks.sync-versions]
description = "Update all version references"
run = "deno run -A scripts/sync-versions.ts"
## Gen
[tasks."gen:rust"]
depends = ["ci:install-deps"]
description = "Generate JSON schemas from the rust code"
run = "cargo run --bin generate_schemas"
sources = ["src/**/*.rs", "Cargo.toml", "Cargo.lock"]
outputs = ["schemas/*.json"]
[tasks."gen:deno"]
description = "Generate the deno client"
run = "deno run -A scripts/generate-schema/index.ts --language typescript"
depends = ["gen:rust"]
sources = ["schemas/*", "scripts/generate-schema.ts"]
outputs = ["src/clients/deno/schemas.ts"]
## Debug
[tasks."print-schema"]
description = "Prints a simplified version of the schema"
usage = '''
arg "[schema]" help="The schema to print; prints all if not provided"
'''
run = "deno run -A scripts/generate-schema/debug.ts {{arg(name=\"schema\")}}"
## Publishing
[tasks."verify-publish:deno"]
description = "Verify the deno client is pulishable"
dir = "src/clients/deno"
run = "deno publish --dry-run"
[tasks.gen]
description = "Run all code gen tasks"
depends = ["gen:*"]
## Build
[tasks."build:rust"]
description = "Build the webview binary"
run = "cargo build -F transparent -F devtools"
sources = ["src/**/*.rs", "Cargo.toml", "Cargo.lock"]
outputs = ["target/debug/deno-webview"]
depends = ["gen:rust"]
[tasks."build:deno"]
description = "Run code gen and ensure the binary is built"
depends = ["gen:deno", "build:rust"]
[tasks.build]
description = "Build all targets"
depends = ["build:*"]
## Lint
[tasks."lint:rust"]
description = "Run clippy against rust code"
depends = ["ci:install-deps"]
run = ["cargo fmt --check", "cargo clippy"]
[tasks."lint:deno"]
description = "Run deno lint"
dir = "src"
run = "deno lint"
[tasks."lint"]
description = "Run all linting tasks"
depends = ["lint:*"]
## Example
[tasks."example:deno"]
description = "Run a deno example"
depends = ["build:deno"]
env = { WEBVIEW_BIN = "../../../target/debug/deno-webview" }
run = "deno run -E -R -N --allow-run examples/{{arg(name=\"example\")}}.ts"
dir = "src/clients/deno"