Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: read and combine both schematics and generators #1103

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

Cammisuli
Copy link
Member

What it does

Combines both schematics and generators schema's when reading schematics/generators

@nx-cloud
Copy link

nx-cloud bot commented Jun 28, 2021

Nx Cloud Report

CI ran the following commands for commit 4f89b0d. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --all --parallel --target=build
#000000 nx run-many --all --parallel --target=lint
#000000 nx run-many --all --parallel --target=test

Sent with 💌 from NxCloud.

try {
Object.entries(
collectionJson.schematics || collectionJson.generators
Object.assign({}, collectionJson.schematics, collectionJson.generators)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to only do one or the other based on whether the workspace is an Angular workspace or a Nx one.

@@ -211,7 +212,12 @@ export async function readSchematicOptions(
collectionPackageJson.json.generators,
dirname(collectionPackageJson.path)
);
const schematics = collectionJson.json.schematics || collectionJson.json.generators;
const schematics = Object.assign(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here. We should check if the workspace is one or the other, and only read the appropriate schemas.

@Cammisuli Cammisuli merged commit b275bdc into nrwl:master Jun 28, 2021
@Cammisuli Cammisuli deleted the combine-schematics-and-generators branch June 28, 2021 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant