Ionic Generate is a simple way to quickly generate and run 'ionic generate' CLI commnds.
Features
Folder Context
The Ionic Generate extension can be run from the VS Code File Explorer context menu.
Right-click the /src/app/ folder or any sub-folder underneath and select Ionic Generate from the context menu.
Ionic Generate wil automatically use the context of the selected folder to determine where the new component's files will be generated.
User Inputs
Once the extension has started, you will be prompted to provide the following inputs:
Component Type(required); select the type of Ionic component you want to generate from the list e.g. page, component, service etc.
Component Name(required); enter a name for your new component e.g. Entering a name with spaces or using Pascal or Camel case will convert the name to Kebab case e.g. 'my page', 'myPage' would generate as 'my-page'
Flag Overrides(optional); This allows you to optionally provide flags that will override the default behaviour e.g. --flat, --skip-test etc.
flags will vary dependant on the component you are generating
not all possible flags are available, the extension only provides the most common uses cases.
Command Review (required); you can preview and manually adjust the generate command before executing. This allows you to add other, less common flags to your command.
Generating the Component
Once all inputs have been provided, a new terminal window will be started called 'Ionic Generate' and the generate command will be executed.
Subsequent execution of the extension will reuse the same terminal window if it is still open.
Requirements
Ionic Generate can only started via the File Explorer context menu.
If the folder you select is not under the /src/app/ folder, an error will be generated.