Generate a component in specific path/subfolder
See original GitHub issuehow can i generate a component or other with generate
in a specific folder?
My project is split into several sub folders and is not flat like the boilerplate.
I tried ignite generate component path1/path2/Name
but do not work
Thank you
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to generate components in a specific folder with ...
Right click on the folder in which you want to create component. Select option Open in Integrated Terminal or Open in Command Prompt...
Read more >How to generate component in subdirectory or specific folder ...
Here are the steps to generate component in a specific folder in Angular. Open terminal at Angular project root directory. Pass the relative ......
Read more >How to generate components in a specific folder using ...
Generating components. To generate components into a specific folder, we can use the ng g c command followed by the folder path. Example:....
Read more >Generate Angular components in specific folders ... - webtutpro
This command will generate a home component inside the app/buttons/home folder. Please note that if the buttons folder doesn't exist Angular CLI ...
Read more >How to generate components in a specific folder
but i want to create into different folder by using same command. example: ng g c test. src >> app>>newfolder>> test>>test.component.ts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another good option would be to support frontmatter to our template files. We already have a PR in-flight for this.
https://github.com/infinitered/ignite/pull/1630
This is how we could approach it.
Here, we need to have an option to pass through the specified path (will need to add a field to
GeneratorOptions
too):https://github.com/infinitered/ignite/blob/ef5810aac792794ee9102e4e563862145d098ea0/src/tools/generators.ts#L116-L117
We would need to pass that through here:
https://github.com/infinitered/ignite/blob/ef5810aac792794ee9102e4e563862145d098ea0/src/commands/generate.ts#L78-L81
And of course we need to be able to pass that through. That would happen somewhere around here:
https://github.com/infinitered/ignite/blob/ef5810aac792794ee9102e4e563862145d098ea0/src/commands/generate.ts#L58-L74
Various ideas:
You’d pull this from
parameters.options.folder
(or maybedest
orpath
?)We could also just use the third parameter.
This would be
parameters.third
.Thoughts?