How would you setup a ionic project with angular cli so you can build web app and ionic app from single code repository? + Also I might want to build PWA app later as well.
Just do not want to avoid of copy-pasting to much if you see what I mean. I saw some related questions people looking to achieve same thing but I didn’t found a clear answer to that yet.
Some one saying to create a responsive app and then adapt it to ionic.
Someone saying just use ionic for all cases (as I am new to ionic I cant clearly see how it would work, also it is sounds not quite right to me but please correct me if i’m wrong on this one).
I want is just to have responsive web app that would work well on all devices which I know how to do and I want to build hybrid app as well to give people such option.
Solution that I am thinning of:
So for my current understanding I can build a web app first and then adapt it for ionic but then I want to keep everything what can be shared in sync (services, models, etc) - do not want to duplicate the code, what share all what possible between the web and mobile apps, That is why I am looking for a solution that I can build multiple apps from single repository. Say in the end of the day I can run a command on my repository like
ng build and get app
angular-cli to build my web app. Then run
ionic build and get the app build for mobile. So the project structure could be looking like that:
App-proj(3 separate folders per one project) e.g https://github.com/strictd/angular2-ionic2-webpack
3 Separate projects:
Anyone can advice on that?
In such case should I consider
web first or
ionic first ?