diff --git a/package.json b/package.json index 1d8bb7a..93b76fe 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "website:dev": "pnpm -C website dev", "website:prod": "pnpm -C website build", "build": "tsdown", - "typecheck": "tsc -b tsconfig/all.json", + "typecheck": "tsc -b tsconfig.build.json", "lint": "oxlint .", "format": "oxfmt .", "format:check": "oxfmt --check .", diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 0000000..3fd6989 --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src", "tests"], + "exclude": ["**/node_modules", "**/dist"] +} diff --git a/packages/dom/tsconfig.json b/packages/dom/tsconfig.json new file mode 100644 index 0000000..3fd6989 --- /dev/null +++ b/packages/dom/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src", "tests"], + "exclude": ["**/node_modules", "**/dist"] +} diff --git a/packages/native/tsconfig.json b/packages/native/tsconfig.json new file mode 100644 index 0000000..3fd6989 --- /dev/null +++ b/packages/native/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src", "tests"], + "exclude": ["**/node_modules", "**/dist"] +} diff --git a/packages/opentui/tsconfig.json b/packages/opentui/tsconfig.json new file mode 100644 index 0000000..3fd6989 --- /dev/null +++ b/packages/opentui/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src", "tests"], + "exclude": ["**/node_modules", "**/dist"] +} diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json new file mode 100644 index 0000000..8eb7469 --- /dev/null +++ b/packages/react/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "jsx": "react-jsx" + }, + "include": ["src", "tests"], + "exclude": ["**/node_modules", "**/dist"] +} diff --git a/packages/shared/bindings/tsconfig.json b/packages/shared/bindings/tsconfig.json new file mode 100644 index 0000000..a6eae6c --- /dev/null +++ b/packages/shared/bindings/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.json", + "include": ["src", "tests"], + "exclude": ["**/node_modules", "**/dist"] +} diff --git a/packages/shared/utils/tsconfig.json b/packages/shared/utils/tsconfig.json new file mode 100644 index 0000000..a6eae6c --- /dev/null +++ b/packages/shared/utils/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig.json", + "include": ["src", "tests"], + "exclude": ["**/node_modules", "**/dist"] +} diff --git a/packages/solid/tsconfig.json b/packages/solid/tsconfig.json index 1716ed0..4aab66b 100644 --- a/packages/solid/tsconfig.json +++ b/packages/solid/tsconfig.json @@ -1,8 +1,5 @@ { - // Referenced from tsconfig/all.json; lives here (like vitest.config.ts) so - // the root workspace carries no Solid dependencies. Solid 2.0 moved the web - // JSX namespace out of `solid-js` into `@solidjs/web`. - "extends": "../../tsconfig/base.json", + "extends": "../../tsconfig.json", "compilerOptions": { "jsx": "preserve", "jsxImportSource": "@solidjs/web" diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..ba5a59a --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,15 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.json" }, + { "path": "./packages/core" }, + { "path": "./packages/dom" }, + { "path": "./packages/react" }, + { "path": "./packages/solid" }, + { "path": "./packages/native" }, + { "path": "./packages/opentui" }, + { "path": "./packages/shared/utils" }, + { "path": "./packages/shared/bindings" }, + { "path": "./benchmark" } + ] +} diff --git a/tsconfig.json b/tsconfig.json index 967cf8e..8436124 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,27 @@ { - "extends": "./tsconfig/base.json" + "compilerOptions": { + "target": "esnext", + "allowJs": false, + "noEmit": true, + "esModuleInterop": true, + "isolatedModules": true, + "lib": ["dom", "dom.iterable", "esnext"], + "module": "esnext", + "moduleResolution": "bundler", + "noImplicitReturns": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "paths": { + "@dunky.dev/state-machine": ["./packages/core/src"], + "@dunky.dev/react-state-machine": ["./packages/react/src"], + "@dunky.dev/solid-state-machine": ["./packages/solid/src"], + "@dunky.dev/native-state-machine": ["./packages/native/src"], + "@dunky.dev/opentui-state-machine": ["./packages/opentui/src"], + "@dunky.dev/state-machine-utils": ["./packages/shared/utils/src"], + "@dunky.dev/state-machine-bindings": ["./packages/shared/bindings/src"] + }, + "types": ["@types/node", "vitest/globals"] + }, + "include": ["*.ts"] } diff --git a/tsconfig/all.json b/tsconfig/all.json deleted file mode 100644 index 9ee2bb9..0000000 --- a/tsconfig/all.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files": [], - "references": [ - { "path": "./react.json" }, - { "path": "../packages/solid" }, - { "path": "../benchmark/tsconfig.json" } - ] -} diff --git a/tsconfig/base.json b/tsconfig/base.json deleted file mode 100644 index 49f680f..0000000 --- a/tsconfig/base.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "esnext", - "allowJs": false, - "noEmit": true, - "esModuleInterop": true, - "isolatedModules": true, - "lib": ["dom", "dom.iterable", "esnext"], - "module": "esnext", - "moduleResolution": "bundler", - "noImplicitReturns": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "paths": { - "@dunky.dev/state-machine": ["../packages/core/src"], - "@dunky.dev/react-state-machine": ["../packages/react/src"], - "@dunky.dev/solid-state-machine": ["../packages/solid/src"], - "@dunky.dev/native-state-machine": ["../packages/native/src"], - "@dunky.dev/opentui-state-machine": ["../packages/opentui/src"], - "@dunky.dev/state-machine-utils": ["../packages/shared/utils/src"], - "@dunky.dev/state-machine-bindings": ["../packages/shared/bindings/src"] - }, - "types": ["@types/node", "vitest/globals"] - } -} diff --git a/tsconfig/react.json b/tsconfig/react.json deleted file mode 100644 index 483885c..0000000 --- a/tsconfig/react.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./base.json", - "compilerOptions": { - "jsx": "react-jsx" - }, - "include": ["../*.ts", "../packages"], - "exclude": ["../**/node_modules", "../**/dist", "../packages/solid"] -}