mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 05:14:25 +00:00
perf(npm): optimize platform binary compilation using dummy runner
This commit is contained in:
+10
-3
@@ -16,6 +16,9 @@ if (existsSync(distDir)) {
|
|||||||
}
|
}
|
||||||
await mkdir(distDir, { recursive: true })
|
await mkdir(distDir, { recursive: true })
|
||||||
|
|
||||||
|
const dummyRunnerPath = path.join(distDir, 'dummy-runner.ts')
|
||||||
|
await writeFile(dummyRunnerPath, '// Shumai Runner Stub\n', 'utf-8')
|
||||||
|
|
||||||
const rootPackageJson = JSON.parse(await Bun.file('package.json').text())
|
const rootPackageJson = JSON.parse(await Bun.file('package.json').text())
|
||||||
const version = rootPackageJson.version || '0.1.0'
|
const version = rootPackageJson.version || '0.1.0'
|
||||||
|
|
||||||
@@ -358,7 +361,7 @@ const shumaiPlugins = [
|
|||||||
}),
|
}),
|
||||||
tailwindPlugin,
|
tailwindPlugin,
|
||||||
]
|
]
|
||||||
await buildPlatformPackages('shumai', './apps/web/src/index.ts', shumaiPlugins)
|
await buildPlatformPackages('shumai', dummyRunnerPath)
|
||||||
await buildMainPackage({
|
await buildMainPackage({
|
||||||
appName: 'shumai',
|
appName: 'shumai',
|
||||||
description: 'A fullstack AI-powered media workspace and workflow engine',
|
description: 'A fullstack AI-powered media workspace and workflow engine',
|
||||||
@@ -373,7 +376,7 @@ const agentPlugins = [
|
|||||||
bundleOptions: {},
|
bundleOptions: {},
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
await buildPlatformPackages('shumai-agent', './apps/agent/src/index.ts', agentPlugins)
|
await buildPlatformPackages('shumai-agent', dummyRunnerPath)
|
||||||
await buildMainPackage({
|
await buildMainPackage({
|
||||||
appName: 'shumai-agent',
|
appName: 'shumai-agent',
|
||||||
description: 'AI worker agent for the shumai media workspace',
|
description: 'AI worker agent for the shumai media workspace',
|
||||||
@@ -388,7 +391,7 @@ const transcodePlugins = [
|
|||||||
bundleOptions: {},
|
bundleOptions: {},
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
await buildPlatformPackages('shumai-transcode', './apps/transcode/src/index.ts', transcodePlugins)
|
await buildPlatformPackages('shumai-transcode', dummyRunnerPath)
|
||||||
await buildMainPackage({
|
await buildMainPackage({
|
||||||
appName: 'shumai-transcode',
|
appName: 'shumai-transcode',
|
||||||
description: 'Media transcoding worker for the shumai media workspace',
|
description: 'Media transcoding worker for the shumai media workspace',
|
||||||
@@ -397,4 +400,8 @@ await buildMainPackage({
|
|||||||
plugins: transcodePlugins,
|
plugins: transcodePlugins,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (existsSync(dummyRunnerPath)) {
|
||||||
|
await rm(dummyRunnerPath)
|
||||||
|
}
|
||||||
|
|
||||||
console.log('\n✅ All applications and platform binaries built and packaged successfully!')
|
console.log('\n✅ All applications and platform binaries built and packaged successfully!')
|
||||||
|
|||||||
Reference in New Issue
Block a user