diff --git a/packages/plugins/components/package.json b/packages/plugins/components/package.json index b7e9692ac..92a91613e 100644 --- a/packages/plugins/components/package.json +++ b/packages/plugins/components/package.json @@ -13,8 +13,8 @@ }, "scripts": { "build": "yarn build:esm && yarn build:cjs", - "build:esm": "tsc --module esnext --outDir lib/esm", - "build:cjs": "tsc", + "build:esm": "tsc --module esnext --outDir lib/esm --project ./tsconfig.build.json", + "build:cjs": "tsc --project ./tsconfig.build.json", "test": "NODE_ENV=test jest" }, "dependencies": { diff --git a/packages/plugins/components/src/NavBar/index.tsx b/packages/plugins/components/src/NavBar/index.tsx index 1e0b7509a..81f64d993 100644 --- a/packages/plugins/components/src/NavBar/index.tsx +++ b/packages/plugins/components/src/NavBar/index.tsx @@ -7,7 +7,7 @@ import { DefaultNavBarContent } from './defaultContent'; export const navBarContentId = 'nav-bar-content'; -interface NavBarProps { +export interface NavBarProps { useCustomContent?: boolean; // rename to show that it is a backNavigation className?: string; } diff --git a/packages/plugins/components/src/NavBar/navbar.stories.tsx b/packages/plugins/components/src/NavBar/navbar.stories.tsx index cf1707507..c415bec36 100644 --- a/packages/plugins/components/src/NavBar/navbar.stories.tsx +++ b/packages/plugins/components/src/NavBar/navbar.stories.tsx @@ -9,7 +9,7 @@ export default { component: NavBar, } as ComponentMeta; -const useStyles = makeStyles((theme: Theme) => ({ +const useStyles = makeStyles((_theme: Theme) => ({ updatedOne: { backgroundColor: 'lightblue', color: 'black', diff --git a/packages/plugins/components/tsconfig.build.json b/packages/plugins/components/tsconfig.build.json new file mode 100644 index 000000000..b48c439cd --- /dev/null +++ b/packages/plugins/components/tsconfig.build.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + // files excluded from the build, we can not put it inro default tsconfig + // as it will screw VSCode IntelliSence + "**/test", + "**/mocks", + "**/__mocks__", + "**/__stories__", + "src/**/*.spec.*", + "src/**/*.test.*", + "src/**/*.mock.*", + "src/**/*.stories.*" + ] +} diff --git a/packages/zapp/console/tsconfig.build.json b/packages/zapp/console/tsconfig.build.json new file mode 100644 index 000000000..b48c439cd --- /dev/null +++ b/packages/zapp/console/tsconfig.build.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + // files excluded from the build, we can not put it inro default tsconfig + // as it will screw VSCode IntelliSence + "**/test", + "**/mocks", + "**/__mocks__", + "**/__stories__", + "src/**/*.spec.*", + "src/**/*.test.*", + "src/**/*.mock.*", + "src/**/*.stories.*" + ] +} diff --git a/packages/zapp/console/tsconfig.json b/packages/zapp/console/tsconfig.json index 0e27291d2..7a0b1db20 100644 --- a/packages/zapp/console/tsconfig.json +++ b/packages/zapp/console/tsconfig.json @@ -12,5 +12,9 @@ "noImplicitOverride": false }, "references": [{ "path": "../../plugins/components" }], - "include": ["src/**/*"] + "include": [ + "src/**/*", + // TODO: *.json could be removed when tsconfig.build.json would be properly consumed by webpack + "src/**/*.json" + ] } diff --git a/tsconfig.base.json b/tsconfig.base.json index 48e257019..52c8f322e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -46,16 +46,5 @@ "@flyteconsole/*": ["./packages/plugins/*/src", "./packages/zapp/*/src"] } }, - "exclude": [ - "**/node_modules", - "**/dist", - "**/lib", - "**/src/**/*.spec.*", - "**/src/**/*.test.*", - "**/src/**/*.stories.*", - // old code patterns - "**/__mocks__", - "**/test", - "**/mocks" - ] + "exclude": ["**/node_modules", "**/dist", "**/lib"] }