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
Published 3 years ago
Updated 2 years ago

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.

egghead
egghead
~ 14 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today