diff --git a/.gitignore b/.gitignore index c752c12e..2a5d3f18 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,14 @@ blob-report/ # TypeScript *.tsbuildinfo +# Prevent compiled files in source directories +libs/*/src/**/*.js +libs/*/src/**/*.d.ts +libs/*/src/**/*.d.ts.map +apps/*/src/**/*.js +apps/*/src/**/*.d.ts +apps/*/src/**/*.d.ts.map + # Misc *.pem diff --git a/libs/dependency-resolver/tsconfig.json b/libs/dependency-resolver/tsconfig.json index 7fb871b0..d46e6126 100644 --- a/libs/dependency-resolver/tsconfig.json +++ b/libs/dependency-resolver/tsconfig.json @@ -1,19 +1,10 @@ { + "extends": "../tsconfig.base.json", "compilerOptions": { - "target": "ES2020", "module": "ESNext", - "lib": ["ES2020"], - "types": ["node"], - "declaration": true, - "declarationMap": true, + "moduleResolution": "bundler", "outDir": "./dist", - "rootDir": "./src", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "moduleResolution": "bundler" + "rootDir": "./src" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] diff --git a/libs/git-utils/tsconfig.json b/libs/git-utils/tsconfig.json index 54e9774b..f677f8d5 100644 --- a/libs/git-utils/tsconfig.json +++ b/libs/git-utils/tsconfig.json @@ -1,19 +1,8 @@ { + "extends": "../tsconfig.base.json", "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "lib": ["ES2020"], - "types": ["node"], - "declaration": true, - "declarationMap": true, "outDir": "./dist", - "rootDir": "./src", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "moduleResolution": "node" + "rootDir": "./src" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] diff --git a/libs/model-resolver/tsconfig.json b/libs/model-resolver/tsconfig.json index 54e9774b..f677f8d5 100644 --- a/libs/model-resolver/tsconfig.json +++ b/libs/model-resolver/tsconfig.json @@ -1,19 +1,8 @@ { + "extends": "../tsconfig.base.json", "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "lib": ["ES2020"], - "types": ["node"], - "declaration": true, - "declarationMap": true, "outDir": "./dist", - "rootDir": "./src", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "moduleResolution": "node" + "rootDir": "./src" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] diff --git a/libs/platform/tsconfig.json b/libs/platform/tsconfig.json index 54e9774b..f677f8d5 100644 --- a/libs/platform/tsconfig.json +++ b/libs/platform/tsconfig.json @@ -1,19 +1,8 @@ { + "extends": "../tsconfig.base.json", "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "lib": ["ES2020"], - "types": ["node"], - "declaration": true, - "declarationMap": true, "outDir": "./dist", - "rootDir": "./src", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "moduleResolution": "node" + "rootDir": "./src" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] diff --git a/libs/tsconfig.base.json b/libs/tsconfig.base.json new file mode 100644 index 00000000..048dc46d --- /dev/null +++ b/libs/tsconfig.base.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": ["ES2020"], + "types": ["node"], + "declaration": true, + "declarationMap": true, + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "moduleResolution": "node" + } +} diff --git a/libs/types/tsconfig.json b/libs/types/tsconfig.json index 54e9774b..f677f8d5 100644 --- a/libs/types/tsconfig.json +++ b/libs/types/tsconfig.json @@ -1,19 +1,8 @@ { + "extends": "../tsconfig.base.json", "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "lib": ["ES2020"], - "types": ["node"], - "declaration": true, - "declarationMap": true, "outDir": "./dist", - "rootDir": "./src", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "moduleResolution": "node" + "rootDir": "./src" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] diff --git a/libs/utils/tsconfig.json b/libs/utils/tsconfig.json index 54e9774b..f677f8d5 100644 --- a/libs/utils/tsconfig.json +++ b/libs/utils/tsconfig.json @@ -1,19 +1,8 @@ { + "extends": "../tsconfig.base.json", "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "lib": ["ES2020"], - "types": ["node"], - "declaration": true, - "declarationMap": true, "outDir": "./dist", - "rootDir": "./src", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "moduleResolution": "node" + "rootDir": "./src" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] diff --git a/package.json b/package.json index 26860ff4..d2081351 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dev:server": "npm run dev --workspace=apps/server", "dev:full": "concurrently \"npm run dev:server\" \"npm run dev:web\"", "build": "npm run build --workspace=apps/ui", - "build:packages": "npm run build -w @automaker/types && npm run build -w @automaker/utils -w @automaker/platform -w @automaker/model-resolver -w @automaker/dependency-resolver && npm run build -w @automaker/git-utils", + "build:packages": "npm run build -w @automaker/types && npm run build -w @automaker/utils && npm run build -w @automaker/platform -w @automaker/model-resolver -w @automaker/dependency-resolver && npm run build -w @automaker/git-utils", "build:server": "npm run build --workspace=apps/server", "build:electron": "npm run build:electron --workspace=apps/ui", "build:electron:dir": "npm run build:electron:dir --workspace=apps/ui",