From c875b45c44375a150d2200662c63b66894a37602 Mon Sep 17 00:00:00 2001 From: Frieder Hannenheim Date: Tue, 28 Jan 2025 18:06:01 +0100 Subject: [PATCH] import json in typescript --- justfile | 3 ++- src/rechner.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index cb6ca01..7941757 100644 --- a/justfile +++ b/justfile @@ -4,8 +4,9 @@ alias c := clean build: mkdir -p build - tsc --outFile build/rechner.js src/rechner.ts cat src/data/* | toml2json > build/gewichtungen.json + # typescript compilation depends on gewichtungen.json + tsc --outFile build/rechner.js src/rechner.ts cp src/index.html build/index.html clean: diff --git a/src/rechner.ts b/src/rechner.ts index f395e87..1e8cbf3 100644 --- a/src/rechner.ts +++ b/src/rechner.ts @@ -13,3 +13,6 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . + +import gewichtungen from '../build/gewichtungen.json' +