Skip to content

Commit

Permalink
fix(angular): handle package.json with no name when migrating from an…
Browse files Browse the repository at this point in the history
…gular cli workspaces
  • Loading branch information
leosvelperez committed May 18, 2022
1 parent afac2d9 commit 11cf09f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,9 @@ export function normalizeOptions(
// use the name (scope if exists) in the root package.json
const { name } = readJson(tree, 'package.json');

if (!name) {
throw new Error(
'Add the name-property to your package.json and try again.'
);
if (name) {
npmScope = name.startsWith('@') ? name.split('/')[0].substring(1) : name;
}

npmScope = name.startsWith('@') ? name.split('/')[0].substring(1) : name;
}

return { ...options, npmScope };
Expand Down

0 comments on commit 11cf09f

Please sign in to comment.