diff options
author | Joris | 2025-04-19 14:02:54 +0200 |
---|---|---|
committer | Joris | 2025-04-19 14:02:54 +0200 |
commit | d4b48491cfaafaee5e7c9c88227055fd884d60f4 (patch) | |
tree | 49be96db72e1cc8dcfcc128b3b7d5286e16180c7 /frontend/bin/compile-ts | |
parent | 632eef6424d8dc8d40c2906177892697679e7b85 (diff) |
Add build command
Diffstat (limited to 'frontend/bin/compile-ts')
-rwxr-xr-x | frontend/bin/compile-ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/frontend/bin/compile-ts b/frontend/bin/compile-ts index 0e1d62a..019efd3 100755 --- a/frontend/bin/compile-ts +++ b/frontend/bin/compile-ts @@ -2,5 +2,17 @@ set -euo pipefail cd ts + tsc --noEmit -esbuild --bundle src/main.ts > ../../backend/public/main.js + +if [ -n "${IS_DEV_SERVER:-}" ]; then + + # dev + esbuild --bundle src/main.ts > ../../backend/public/main.js + +else + + # prod + esbuild --minify --bundle src/main.ts > ../../backend/public/main.js + +fi |