-
Notifications
You must be signed in to change notification settings - Fork 0
/
Trunk.toml
30 lines (28 loc) · 905 Bytes
/
Trunk.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
[[hooks]]
stage = "build"
command = "bash"
command_arguments = ["-c", """
WASM_BINDGEN_THREADS_STACK_SIZE=16777216 wasm-pack build --no-pack \
--$(echo $TRUNK_PROFILE | sed s/debug/dev/) \
--no-typescript \
--target web \
--out-dir $TRUNK_STAGING_DIR \
worker && \
if [ "$TRUNK_PROFILE" == "release" ]; then \
echo "Running wasm-opt..."; \
wasm-opt --enable-threads \
--enable-bulk-memory \
-O4 $TRUNK_STAGING_DIR/worker_bg.wasm \
-o $TRUNK_STAGING_DIR/worker_bg.wasm; \
fi \
"""]
[[hooks]]
stage = "build"
command = "bash"
command_arguments = ["-c", """
npm install && \
node_modules/.bin/rollup codemirror_interface.ts -f es \
-o $TRUNK_STAGING_DIR/codemirror.js \
-p @rollup/plugin-node-resolve \
-p @rollup/plugin-typescript
"""]