Skip to content

Add support to run schematics that are part of custom plugins within an existing workspace. #3231

@niki4810

Description

@niki4810

Description

We can currently create custom schematics using the nx generate @nrwl/workspace-schematic command and run them locally within an existing workspace (consisting of apps and libs) via nx workspace-schematic <schematic-name>

However, when creating a custom plugin via nx generate @nrwl/nx-plugin:plugin and creating a schematic under libs/<plugin-name>/src/schematics, there is currently no way to run this plugin locally to use/test our schematics (unless we publish)

Please refer to this slack thread for more details: https://nrwlcommunity.slack.com/archives/CMFKWPU6Q/p1592940422065400

Motivation

Having the ability to run plugins (with custom schematics) helps in:

  • following the same syntax external plugins: nx generate <plugin-name>:<schematic> instead of new command nx workspace-schematic <schematic>
  • Have the ability to list the schematics via: nx list <plugin-name>

Suggested Implementaion

  • I would expect it to work the same way as any published community plugins work, i.e. nx generate <plugin-name>:<schematic>

Alternate Implementations

  • N/A

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions