Answer the question
In order to leave comments, you need to log in
How to create npm commands like in angular ng g?
Hello!
You need to implement the command as in the angular cli: ng gc - that is, the command creates all the necessary files in the selected directory and prescribes connections.
In which direction should you dig?)
Answer the question
In order to leave comments, you need to log in
ng g is Schematics and is quite hard to master.
You need a scaffolder, some kind of yeoman or plop
Apparently, look at modules that return the current directory, command line arguments, and possibly some kind of template engine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question