-
Notifications
You must be signed in to change notification settings - Fork 669
feat(generators): add --minimal flag #2799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Note: This is just a draft and I'd love some feedback. Honestly not sure how to build this locally & test especially because the touches are spread across 3 repos.. |
@CoreyCole Haha, yeah. Working on generators requires coordinating three repos/releases. I personally love this idea: just generating a skeleton of the components. Just so you're aware, we are going to be taking another look at the generator architecture in the coming months. We're planning on building on the shoulders of the Angular DevKit and their "schematics" (see https://github.com/angular/devkit/tree/master/packages/angular_devkit/schematics). This is the placeholder for that project: #2407 |
@CoreyCole Would you mind joining the |
@CoreyCole I think it's time to close this PR. We really want to be focusing on the future of Ionic Angular using Ionic v4 and the Angular CLI generators. If you're curious what this looks like, please see this 👉 #3019 The generators for v4 are powered by schematics and the Angular CLI. Right now they still need some work, but we're almost there. Thanks for the PR, I apologize I wasn't able to get it in for v3 apps. |
No worries! Thanks for the pointer |
Short description of what this resolves:
I want to implement a flag for the generate command that uses alternative templates that only include the bare minimum copypasta. Inspired from the
--minimal
flag in the angular-cli.The things I would omit would be:
ionViewDidLoad()
console logBut I'm open to suggestions about what else could be altered to be more "minimal". These are just the things that I often delete straight away when I use the generator, so I'd love to automate this.
Changes proposed in this pull request:
For
ionic-cli
repo:For
ionic-app-scripts
repo:.minimal
pre extension inionic-app-scripts/src/generators/constants.ts
filterOutTemplates()
function inionic-app-scripts/src/generators/util.ts
For
ionic
repo:ts.minimal.tmpl
files for all modules except tabsRefactors:
ionic/scripts/templates/page/ts.tmpl
for consistency with other templates