From 7fbd4c85cbc4186dcd0bcf4d4c494343784d966d Mon Sep 17 00:00:00 2001 From: Lukas Hass Date: Tue, 1 Feb 2022 11:22:33 +0100 Subject: [PATCH] build iframe-api-typings with tsc --- front/package.json | 2 +- front/packages/iframe-api-typings/.gitignore | 2 +- front/tsconfig-for-iframe-api-typings.json | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 front/tsconfig-for-iframe-api-typings.json diff --git a/front/package.json b/front/package.json index b1d07f14..227b0d86 100644 --- a/front/package.json +++ b/front/package.json @@ -78,7 +78,7 @@ "templater": "cross-env ./templater.sh", "serve": "cross-env vite --host", "build": "cross-env vite build", - "build-typings": "cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack.json\" NODE_ENV=production BUILD_TYPINGS=1 webpack", + "build-typings": "cross-env tsc --project tsconfig-for-iframe-api-typings.json", "test": "cross-env TS_NODE_PROJECT=\"tsconfig-for-jasmine.json\" ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json", "lint": "node_modules/.bin/eslint src/ tests/ --ext .ts,.svelte", "fix": "node_modules/.bin/eslint --fix src/ tests/ --ext .ts,.svelte", diff --git a/front/packages/iframe-api-typings/.gitignore b/front/packages/iframe-api-typings/.gitignore index f850ebdb..cd4efd8e 100644 --- a/front/packages/iframe-api-typings/.gitignore +++ b/front/packages/iframe-api-typings/.gitignore @@ -1 +1 @@ -iframe_api.d.ts +*.d.ts diff --git a/front/tsconfig-for-iframe-api-typings.json b/front/tsconfig-for-iframe-api-typings.json new file mode 100644 index 00000000..acac1c4e --- /dev/null +++ b/front/tsconfig-for-iframe-api-typings.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./packages/iframe-api-typings/", + "declaration": true, + "emitDeclarationOnly": true, + "types": ["phaser"] + }, + "include": ["src/iframe_api.ts"] +}