From 70750b27b72f38704b368817b0a048ac748e3739 Mon Sep 17 00:00:00 2001 From: Carina Ursu Date: Mon, 6 Mar 2023 11:44:03 -0800 Subject: [PATCH] chore: build optimization Signed-off-by: Carina Ursu --- Dockerfile | 2 +- package.json | 1 + packages/common/package.json | 1 + packages/components/package.json | 1 + packages/console/package.json | 3 ++- packages/flyte-api/package.json | 1 + packages/flyteidl-types/package.json | 1 + packages/locale/package.json | 1 + packages/ui-atoms/package.json | 1 + 9 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 10c112b41..5ea114ea0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN : \ --mount=type=cache,target=/root/.yarn \ # install all dependencies so we can build && yarn workspaces focus --all --production \ - && yarn build:pack \ + && yarn build:types \ && BASE_URL=/console yarn run build:prod \ && cp -R ./website/dist/* /app diff --git a/package.json b/package.json index 961bdfe5f..7925dbb22 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "scripts": { "postinstall": "husky install", "build:pack": "yarn workspaces foreach -vit --include '{@flyteorg/flyteidl-types,@flyteorg/flyte-api,@flyteorg/ui-atoms,@flyteorg/common,@flyteorg/locale,@flyteorg/flyte-api,@flyteorg/components,@flyteorg/console}' run build", + "build:types": "yarn workspaces foreach -vit --include '{@flyteorg/flyteidl-types,@flyteorg/flyte-api,@flyteorg/ui-atoms,@flyteorg/common,@flyteorg/locale,@flyteorg/flyte-api,@flyteorg/components,@flyteorg/console}' run build:types", "clean": "git clean -fxd --exclude script", "gen:ssl": "make generate_ssl", "start": "yarn workspace @flyteconsole/client-app start", diff --git a/packages/common/package.json b/packages/common/package.json index 3c2abd4cc..24b427853 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -30,6 +30,7 @@ "build": "yarn clean && yarn build:esm && yarn build:cjs", "build:esm": "run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", "build:cjs": "run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json", + "build:types": "run -T tsc --module esnext --project ./tsconfig.build.es.json --emitDeclarationOnly && run -T tsc-alias -p ./tsconfig.build.es.json", "test": "NODE_ENV=test jest" } } diff --git a/packages/components/package.json b/packages/components/package.json index 8bbb3141b..4efc1313f 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -36,6 +36,7 @@ "build": "yarn clean && yarn build:esm && yarn build:cjs", "build:esm": "run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", "build:cjs": "run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json", + "build:types": "run -T tsc --module esnext --project ./tsconfig.build.es.json --emitDeclarationOnly && run -T tsc-alias -p ./tsconfig.build.es.json", "test": "NODE_ENV=test jest" }, "dependencies": { diff --git a/packages/console/package.json b/packages/console/package.json index 34fe369b5..671f0ded8 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -33,8 +33,9 @@ "clean": "rm -rf dist && rm -rf lib && rm -rf **.tsbuildinfo || true", "build:watch": "run -T tsc-watch --noClear -p ./tsconfig.es.build.json --onSuccess \"yarn build\"", "build": "yarn clean && yarn build:esm && yarn build:cjs", - "build:esm": "mkdir lib && cp -R src/assets ./lib && run -T tsc --module esnext --outDir ./lib --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", + "build:esm": "mkdir lib && cp -R src/assets ./lib && run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", "build:cjs": "mkdir dist && cp -R src/assets ./dist && run -T wait-on ./dist/assets && run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json", + "build:types": "run -T tsc --module esnext --project ./tsconfig.build.es.json --emitDeclarationOnly && run -T tsc-alias -p ./tsconfig.build.es.json", "test": "NODE_ENV=test jest" }, "installConfig": { diff --git a/packages/flyte-api/package.json b/packages/flyte-api/package.json index 173983dd4..d51134565 100644 --- a/packages/flyte-api/package.json +++ b/packages/flyte-api/package.json @@ -36,6 +36,7 @@ "build": "yarn clean && yarn build:esm && yarn build:cjs", "build:esm": "run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", "build:cjs": "run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json", + "build:types": "run -T tsc --module esnext --project ./tsconfig.build.es.json --emitDeclarationOnly && run -T tsc-alias -p ./tsconfig.build.es.json", "push:update": "yarn clean && yarn build && yarn publish", "test": "NODE_ENV=test jest" }, diff --git a/packages/flyteidl-types/package.json b/packages/flyteidl-types/package.json index 844c0b834..f9931cda3 100644 --- a/packages/flyteidl-types/package.json +++ b/packages/flyteidl-types/package.json @@ -36,6 +36,7 @@ "build": "yarn clean && yarn build:esm && yarn build:cjs", "build:esm": "run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", "build:cjs": "run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json", + "build:types": "run -T tsc --module esnext --project ./tsconfig.build.es.json --emitDeclarationOnly && run -T tsc-alias -p ./tsconfig.build.es.json", "test": "NODE_ENV=test jest" }, "peerDependencies": { diff --git a/packages/locale/package.json b/packages/locale/package.json index 0247ce006..13efbee62 100644 --- a/packages/locale/package.json +++ b/packages/locale/package.json @@ -36,6 +36,7 @@ "build": "yarn clean && yarn build:esm && yarn build:cjs", "build:esm": "run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", "build:cjs": "run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json", + "build:types": "run -T tsc --module esnext --project ./tsconfig.build.es.json --emitDeclarationOnly && run -T tsc-alias -p ./tsconfig.build.es.json", "test": "NODE_ENV=test jest" }, "devDependencies": { diff --git a/packages/ui-atoms/package.json b/packages/ui-atoms/package.json index 6e784bc72..de1597275 100644 --- a/packages/ui-atoms/package.json +++ b/packages/ui-atoms/package.json @@ -27,6 +27,7 @@ "build": "yarn clean && yarn build:esm && yarn build:cjs", "build:esm": "run -T tsc --module esnext --project ./tsconfig.build.es.json && run -T tsc-alias -p ./tsconfig.build.es.json", "build:cjs": "run -T tsc --project ./tsconfig.build.json && run -T tsc-alias -p ./tsconfig.build.json", + "build:types": "run -T tsc --module esnext --project ./tsconfig.build.es.json --emitDeclarationOnly && run -T tsc-alias -p ./tsconfig.build.es.json", "test": "NODE_ENV=test jest" }, "installConfig": {