Skip to content

Commit 9bb7314

Browse files
committed
Fix scripts
1 parent e410240 commit 9bb7314

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

scripts/build.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ function main() {
1818
const packages = getPackages()
1919
const graph = getDependencyGraph(packages)
2020
for (const level of getLevels(graph)) {
21-
const scopes = [] as string[]
2221
for (const pkg of level) {
23-
scopes.push('--scope', pkg)
24-
}
25-
const { signal, status } = spawn.sync(
26-
'yarn',
27-
['lerna', 'exec', 'yarn', 'pack', ...scopes],
28-
{ stdio: 'inherit' },
29-
)
30-
if (signal || (status !== null && status > 0)) {
31-
process.exit(status || 1)
22+
const pkgInfo = packages[pkg]
23+
if (!pkgInfo) {
24+
throw new Error(`Package ${pkg} not found`)
25+
}
26+
const { signal, status } = spawn.sync('yarn', ['pack'], {
27+
stdio: 'inherit',
28+
cwd: path.join(root, pkgInfo.location),
29+
})
30+
if (signal || (status !== null && status > 0)) {
31+
process.exit(status || 1)
32+
}
3233
}
3334
}
3435
for (const dir of subDirs) {

0 commit comments

Comments
 (0)