-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.toml
More file actions
52 lines (38 loc) · 1.14 KB
/
Copy pathMakefile.toml
File metadata and controls
52 lines (38 loc) · 1.14 KB
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
[env]
CHROMEDRIVER_PATH = "../tests/chromedriver"
# Build
[tasks.build]
alias = "copy"
[tasks.build_wasm_pack]
command = "wasm-pack"
args = ["build", "--target", "web", "--release"]
[tasks.copy]
command = "cp"
args = ["-v", "background.js", "content-script.js", "manifest.json", "sidepanel.css", "sidepanel.html",
"sidepanel.js", "images/icon.png", "pkg/"]
dependencies = ["build_wasm_pack"] # TODO add "tailwindcss"
# Build css
[tasks.tailwindcss]
command = "npx"
args = ["tailwindcss", "-c", "tailwind.config.js", "-o", "pkg/style.css", "-m"]
[tasks.tailwindcss_debug]
command = "npx"
args = ["tailwindcss", "-c", "tailwind.debug.js", "-o", "pkg/style.css"]
# Test
[tasks.test]
command = "wasm-pack"
args = ["test", "--chrome", "--headless", "--chromedriver", "${CHROMEDRIVER_PATH}"]
# Publish
[tasks.pre_publish]
command = "rm"
args = ["-f", "pkg/README.md", "pkg/package.json", "pkg/dictionary_bg.wasm.d.ts", "pkg/dictionary.d.ts"]
# Clean
[tasks.clean]
command = "cargo"
args = ["clean"]
dependencies = ["clean_pkg"]
[tasks.clean_pkg]
script_runner = "sh"
script = 'find ./pkg ! -name style.css -delete'
#command = "rm"
#args = ["-r", "pkg"]