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

feat(nx-plugin): slim down default generated nx-plugin #16168

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

AgentEnder
Copy link
Member

@AgentEnder AgentEnder commented Apr 6, 2023

Current Behavior

nx g plugin creates:

  • e2e tests by default
  • Boilerplate executor + generator

Expected Behavior

  • To add e2e you can specify --e2eTestRunner jest, or generate it with nx g @nrwl/nx-plugin:e2e-project
  • You can add a generator with nx g generator

Related Issue(s)

Fixes #


@vercel
Copy link

vercel bot commented Apr 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2023 9:13pm

@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from 0408eb3 to 069ace9 Compare April 11, 2023 16:28
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from 069ace9 to e62d519 Compare April 13, 2023 21:41
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from e62d519 to c6c5f07 Compare April 13, 2023 22:07
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from c6c5f07 to 16ee5bf Compare April 14, 2023 14:25
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from 16ee5bf to 987a07e Compare April 14, 2023 14:54
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch 2 times, most recently from 92adec8 to d591a21 Compare April 14, 2023 15:21
@AgentEnder AgentEnder marked this pull request as ready for review April 14, 2023 15:30
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from d591a21 to b9d5e2b Compare April 14, 2023 15:52
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from 4d11406 to d2cdbe5 Compare April 17, 2023 21:43
@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch 2 times, most recently from 0b3b4e7 to ddd08c1 Compare April 18, 2023 16:19
Comment on lines 31 to 36
// it('should be able to build generated projects', async () => {
// const name = uniq('proj')
// await runNxCommandAsync(`generate <%= npmPackageName %>:{my-generator} --name ${name}`);
// expect(() => runNxCommand('build ${proj}')).not.toThrow();
// expect(() => checkFilesExist([`dist/${name}/index.js`])).not.toThrow();
// });
Copy link
Collaborator

Choose a reason for hiding this comment

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

Uncomment and use xit

//
// it('should be able to build generated projects', async () => {
// const name = uniq('proj')
// await runNxCommandAsync(`generate <%= npmPackageName %>:{my-generator} --name ${name}`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

const generator = 'PLACEHOLDER'

{
generators: {},
}
);
if (!skipLintChecks) {
await pluginLintCheckGenerator(host, {
projectName,

This comment was marked as resolved.

Comment on lines 32 to 33
await createExecutorsJson(tree, root, options.pluginName);
await createGeneratorsJson(tree, root, options.pluginName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this.

packageJson.generators ?? packageJson.schematics
);
const generatorsJson = readJson<GeneratorsJson>(tree, generatorsPath);
return generatorsJson.generators[generatorName] !== undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check schematics too

@AgentEnder AgentEnder force-pushed the feat/slim-down-default-plugins branch from ac7ec35 to da953d6 Compare April 18, 2023 21:10
@AgentEnder AgentEnder merged commit 00f424a into nrwl:master Apr 18, 2023
@AgentEnder AgentEnder deleted the feat/slim-down-default-plugins branch April 18, 2023 21:47
peppoasap pushed a commit to peppoasap/nx that referenced this pull request Apr 18, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants