mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 03:23:57 +08:00
build: throw an exception when a package is not found in monorepo
This commit is contained in:
parent
56a97c1fc2
commit
c0f61dcb83
@ -190,6 +190,12 @@ export const packages: PackageMap =
|
||||
// Only build the entry if there's a package name.
|
||||
return packages;
|
||||
}
|
||||
if (!(name in monorepoPackages)) {
|
||||
throw new Error(
|
||||
`Package ${name} found in ${JSON.stringify(pkg.root)}, not found in .monorepo.json.`,
|
||||
);
|
||||
}
|
||||
|
||||
const bin: {[name: string]: string} = {};
|
||||
Object.keys(packageJson['bin'] || {}).forEach(binName => {
|
||||
let p = path.resolve(pkg.root, packageJson['bin'][binName]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user