Skip to content

Commit 8d1ff5a

Browse files
authored
Merge pull request #55 from geobrowser/nik/build-setup
Improves the build setup
2 parents 5fcc5aa + 4d36e80 commit 8d1ff5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+366
-271
lines changed

apps/events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite --force",
8-
"build": "tsc -b && vite build",
8+
"build": "echo 'TODO'",
99
"lint": "pnpm biome lint src/*",
1010
"lint:fix": "pnpm biome lint --write src/*",
1111
"format": "pnpm biome format src/*",

apps/events/tsconfig.app.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
{
2+
"extends": "../../tsconfig.base.json",
23
"compilerOptions": {
34
"target": "ES2020",
45
"useDefineForClassFields": true,
56
"lib": ["ES2020", "DOM", "DOM.Iterable"],
67
"module": "ESNext",
78
"skipLibCheck": true,
89

10+
"composite": false,
11+
"incremental": false,
12+
"declaration": false,
13+
"declarationMap": false,
14+
915
/* Bundler mode */
1016
"moduleResolution": "bundler",
1117
"allowImportingTsExtensions": true,
@@ -24,7 +30,9 @@
2430
/* Shadcn */
2531
"baseUrl": ".",
2632
"paths": {
27-
"@/*": ["./src/*"]
33+
"@/*": ["./src/*"],
34+
"graph-framework": ["../../packages/graph-framework/src/index.js"],
35+
"graph-framework/*": ["../../packages/graph-framework/src/*.js"]
2836
}
2937
},
3038
"include": ["src"]

apps/events/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
/* Shadcn */
66
"baseUrl": ".",
77
"paths": {
8-
"@/*": ["./src/*"]
8+
"@/*": ["./src/*"],
9+
"graph-framework": ["../../packages/graph-framework/src/index.js"],
10+
"graph-framework/*": ["../../packages/graph-framework/src/*.js"]
911
}
1012
}
1113
}

apps/events/tsconfig.node.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
{
2+
"extends": "../../tsconfig.base.json",
23
"compilerOptions": {
34
"target": "ES2022",
45
"lib": ["ES2023"],
56
"module": "ESNext",
67
"skipLibCheck": true,
78

9+
"composite": false,
10+
"incremental": false,
11+
"declaration": false,
12+
"declarationMap": false,
13+
814
/* Bundler mode */
915
"moduleResolution": "bundler",
1016
"allowImportingTsExtensions": true,

apps/events/vite.config.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import path from 'node:path';
21
import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
32
import react from '@vitejs/plugin-react';
3+
import path from 'node:path';
44
import { defineConfig } from 'vite';
55
import { nodePolyfills } from 'vite-plugin-node-polyfills';
66
import topLevelAwait from 'vite-plugin-top-level-await';
@@ -23,6 +23,13 @@ export default defineConfig({
2323
resolve: {
2424
alias: {
2525
'@': path.resolve(__dirname, './src'),
26+
'graph-framework': path.resolve(__dirname, '../../packages/graph-framework/src'),
27+
'graph-framework-space-events': path.resolve(__dirname, '../../packages/graph-framework-space-events/src'),
28+
'graph-framework-utils': path.resolve(__dirname, '../../packages/graph-framework-utils/src'),
29+
'graph-framework-schema': path.resolve(__dirname, '../../packages/graph-framework-schema/src'),
30+
'graph-framework-identity': path.resolve(__dirname, '../../packages/graph-framework-identity/src'),
31+
'graph-framework-key': path.resolve(__dirname, '../../packages/graph-framework-key/src'),
32+
'graph-framework-messages': path.resolve(__dirname, '../../packages/graph-framework-messages/src'),
2633
},
2734
},
2835
});

apps/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"type": "module",
55
"scripts": {
6-
"dev": "TS_NODE_TRANSPILE_ONLY=true nodemon --exec node --loader ts-node/esm ./src/index.ts",
6+
"dev": "bun run ./src/index.ts",
77
"build:ts": "rm -rf dist && pnpm tsc --project tsconfig.json",
88
"build:deploy": "rm -rf build && pnpm deploy --filter=server --prod build",
99
"build": "pnpm run build:ts && pnpm build:deploy",

apps/server/tsconfig.json

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
{
2+
"extends": "../../tsconfig.base.json",
3+
"include": ["./src"],
24
"compilerOptions": {
3-
"skipLibCheck": true,
4-
"module": "ESNext",
5-
"moduleResolution": "Bundler",
6-
"target": "ESNext",
7-
"isolatedModules": true,
8-
"esModuleInterop": true,
9-
"noEmit": false,
10-
"outDir": "dist",
11-
"lib": ["esnext"],
12-
"types": ["node"],
13-
"baseUrl": "./",
14-
"strict": true,
15-
"exactOptionalPropertyTypes": true
16-
},
17-
"ts-node": {
18-
"esm": true
19-
},
20-
"exclude": ["node_modules"],
21-
"include": ["./src"]
5+
"composite": false,
6+
"noEmit": true,
7+
"incremental": false,
8+
"declaration": false,
9+
"declarationMap": false
10+
}
2211
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"vite-plugin-dts": "^4.3.0"
1313
},
1414
"scripts": {
15-
"build": "pnpm --filter graph-framework-utils build",
15+
"build": "pnpm -r build",
1616
"ts:check": "pnpm -r ts:check",
17-
"test": "pnpm -r test",
17+
"test": "vitest",
1818
"lint": "pnpm -r lint",
1919
"format": "pnpm -r format",
2020
"check": "pnpm -r check"

packages/graph-framework-identity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"exports": {
1717
".": {
18-
"default": "./src/index.js"
18+
"default": "./dist/index.js"
1919
}
2020
},
2121
"peerDependencies": {
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
2-
"extends": "../../tsconfig.options.json",
2+
"extends": "./tsconfig.src.json",
3+
"references": [{ "path": "../graph-framework-utils/tsconfig.build.json" }],
34
"compilerOptions": {
4-
"outDir": "./dist",
5-
"rootDir": "./src"
5+
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
6+
"outDir": "build/esm",
7+
"declarationDir": "build/dts",
8+
"stripInternal": true
69
},
7-
"include": ["./src"],
8-
"exclude": ["node_modules", "src/**/*.test.ts", "src/**/*.spec.ts", "dist"]
10+
"exclude": ["node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
911
}

0 commit comments

Comments
 (0)