Skip to content
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

Configurable Starters #3499

Open
imhoffd opened this issue Aug 8, 2018 · 12 comments
Open

Configurable Starters #3499

imhoffd opened this issue Aug 8, 2018 · 12 comments

Comments

@imhoffd
Copy link
Contributor

imhoffd commented Aug 8, 2018

Many framework CLIs have a single starter with feature flags to enable/disable/switch certain features and preferences such as TypeScript, testing frameworks, theme, etc. We've already seen requests for this, such as #3490, #4236

The starters in place for Ionic 4 beta are the typical Ionic-style starters, but can we make one starter where the contents and options are configurable? Can ionic start prompt for all these options?

Examples:

ionic start --nav-style=tabs
ionic start --no-karma
ionic start --theme=dark
ionic start --no-lazy-loading
ionic start --css
@rdlabo
Copy link
Contributor

rdlabo commented Aug 9, 2018

I think this(--no-karma, --theme=dark, --no-lazy-loading) is possible.
After git clone, CLI change templates is not difficult. For examle, this. 578ab61#diff-4a980f27a232e57ec064ec6e999db520R655

@imhoffd
Copy link
Contributor Author

imhoffd commented Aug 9, 2018

I'm not certain how scalable that is. If the starter's file structure changes even slightly, it could result in runtime errors and will be difficult to maintain.

Your PR for the -s flag could easily be a part of this new type of starter, however:

ionic start --no-karma --feature-structure=type

^ This would start a new app without karma and the old way of structuring features (pages, components, etc).

@rdlabo
Copy link
Contributor

rdlabo commented Aug 25, 2018

I'm glad for v3's folder structure can also be used in v4!
May I try to challenge implementation?

@imhoffd
Copy link
Contributor Author

imhoffd commented Aug 20, 2019

A note: the important conceptual change here is that the logic of how to structure a starter is shifted onto the starter template itself, and the Ionic CLI becomes just a way to ask for inputs and write files. This makes ionic start more bullet-proof and future-proof, on top of unlocking a bunch of features.

cc @johneast

@Sampath-Lokuge
Copy link

Hi, @dwieeb Will we have this feature soon on the Ionic 5 app? i.e. create CSS apps. Because of @adamdbradley instruct us to use CSS only apps. It is here: https://twitter.com/adamdbradley/status/1250790908833955840

@imhoffd
Copy link
Contributor Author

imhoffd commented Apr 21, 2020

Probably not soon, no. I wouldn't make decisions for your organization based on opinions on Twitter. Use what works best for you and your team. In the meantime, it isn't terribly difficult to change an Ionic Angular app to use CSS if that's what you want.

@Sampath-Lokuge
Copy link

@dwieeb it isn't terribly difficult to change an Ionic Angular app to use CSS if that's what you want. Yes, what is the best way to do that? Are you telling me to change each and every SCSS file manually after it was generated by the CLI or else?

@imhoffd
Copy link
Contributor Author

imhoffd commented Apr 21, 2020

Are you telling me to change each and every SCSS file manually after it was generated by the CLI

Yes. You could also start with an Angular app (with the css option) and run the ng add @ionic/angular, but I haven't tried that myself.

@Sampath-Lokuge
Copy link

@dwieeb

You could also start with an Angular app (with the css option) and run the ng add @ionic/angular

I don't think this is a good option since we cannot create Side menu, Tabs and Capacitor apps by default here. It will be a big loss for us.

The manual change also an annoying thing since we need to change the file extension and its usage file and etc.

So our only hope here is you'll give this soon for us!

@imhoffd
Copy link
Contributor Author

imhoffd commented Apr 22, 2020

Yeah, there isn't an ideal workaround right now. Hopefully I can prioritize configurable starters soon.

@Sampath-Lokuge
Copy link

@dwieeb Thanks a lot. We'll highly appreciate it since now CSS is the default template for almost all the top frameworks. That is manually due to CSS supports variables and a lot more now and evolving it rapidly.

@eliashdezr
Copy link

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Tooling 🔧
  
Backlog 🤖
Development

No branches or pull requests

4 participants