1. 20
    Run an Nx Generator With the Nx Console VSCode Extension
    43s

Run an Nx Generator With the Nx Console VSCode Extension

Share this video with your friends

Social Share Links

Send Tweet

We can run Nx Generators directly from the console. However, if you prefer a more interactive, UI-driven approach, the Nx Console extension for VSCode is for you.

Interestingly, Nx Console not only allows to run built-in generators that come with the various Nx plugins, but it is also possible to directly run local Nx workspace generators.

Prefer to read along as well? Here's the accompanying article.

Instructor: [0:00] Workspace generators, such as our new article generator here, can be invoked by using the command line. The cool part is that we can also use Nx Console on Visual Studio Code to invoke them. Whenever such a workspace generator is available, if I click on Generate and write workspace, we can see that it picks up our new article generator.

[0:19] If we click on it, based on a schema that we define, it figures out that we need a title and an author, which is required, and an excerpt, which is optional. Here, we can write, yet-another-article, here is the author. You can see how it already starts generating it behind the scenes. If we run and go here to our Articles folder, we would see the yet-another-article being generated.