forked from getsentry/XcodeBuildMCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
37 lines (35 loc) · 923 Bytes
/
tsup.config.ts
File metadata and controls
37 lines (35 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { defineConfig } from 'tsup';
import { chmodSync, existsSync } from 'fs';
import { createPluginDiscoveryPlugin } from './build-plugins/plugin-discovery.js';
export default defineConfig({
entry: {
index: 'src/index.ts',
'doctor-cli': 'src/doctor-cli.ts',
},
format: ['esm'],
target: 'node18',
platform: 'node',
outDir: 'build',
clean: true,
sourcemap: true, // Enable source maps for debugging
dts: {
entry: {
index: 'src/index.ts',
},
},
splitting: false,
shims: false,
treeshake: true,
minify: false,
esbuildPlugins: [createPluginDiscoveryPlugin()],
onSuccess: async () => {
console.log('✅ Build complete!');
// Set executable permissions for built files
if (existsSync('build/index.js')) {
chmodSync('build/index.js', '755');
}
if (existsSync('build/doctor-cli.js')) {
chmodSync('build/doctor-cli.js', '755');
}
},
});