There was an error while loading. Please reload this page.
1 parent 882ab70 commit 0a33747Copy full SHA for 0a33747
2 files changed
bin/bundle
@@ -1,11 +1,24 @@
1
#! /bin/sh
2
3
+rm -rf lib
4
+
5
if [ "$1" = "dev" ]; then
6
OPTS="--sourcemap --watch"
7
+ TSC_OPTS="--watch"
8
+elif [ "$1" = "test" ]; then
9
+ OPTS="--sourcemap"
10
else
11
OPTS="--minify"
- (cd lib && rm *.js.map) >> /dev/null 2>&1
12
fi
-npx esbuild src/vanilla.ts src/over-the-top.ts --bundle $OPTS --target=ESnext --outdir=lib
13
-tsc
14
+if echo "$TSC_OPTS" | grep -q -- "--watch"; then
15
+ tsc $TSC_OPTS &
16
+else
17
+ tsc $TSC_OPTS
18
+ rm -rf lib/bundled
19
+ npx esbuild src/vanilla.ts src/over-the-top.ts --bundle $OPTS --target=ESnext --outdir=lib
20
+ cp lib/*.js lib/*.map tests >/dev/null 2>&1
21
+fi
22
23
+rm -f lib/over-the-top.d.ts
24
+rm -f lib/vanilla.d.ts
bin/test
0 commit comments