From 3f222186e0bf441b415cb63ca7174b3f2a626fb3 Mon Sep 17 00:00:00 2001 From: Arber Avdullahu Date: Thu, 20 Mar 2025 19:02:21 +0100 Subject: [PATCH] feat: add TypeScript compilation step for tutorial and build scripts - Add new `compile:ts` script to compile TypeScript files - Update tutorial script to compile TS before running - Update build script to compile TS before bundling - Fix failing tutorial and build execution due to missing TS compilation This change ensures TypeScript files are properly compiled before running tutorials or building the project, preventing execution failures. --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 515ec8dde..16b956f70 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,9 @@ "fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit", "prettier": "npx prettier --check '**/*.{js,ts}'", "prettier:fix": "npx prettier --write '**/*.{js,ts}'", - "tutorial": "npm install && cd tutorials && node index.js", - "build": "browserify lib/jiff-client.js --debug -s JIFFClient -o dist/jiff-client.js && browserify lib/ext/jiff-client-websockets.js --debug -s jiff_websockets -o dist/jiff-client-websockets.js" + "compile:ts": "npx tsc -p lib/common/tsconfig.json", + "tutorial": "npm run compile:ts && cd tutorials && node index.js", + "build": "npm run compile:ts && browserify lib/jiff-client.js --debug -s JIFFClient -o dist/jiff-client.js && browserify lib/ext/jiff-client-websockets.js --debug -s jiff_websockets -o dist/jiff-client-websockets.js" }, "dependencies": { "bignumber.js": "^9.1.2",