import json in typescript

This commit is contained in:
Frieder Hannenheim 2025-01-28 18:06:01 +01:00
parent a2e108f6e8
commit c875b45c44
2 changed files with 5 additions and 1 deletions

View file

@ -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:

View file

@ -13,3 +13,6 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import gewichtungen from '../build/gewichtungen.json'