Languages

Menu
Sites
Language
Building Web Application with one code base but multiple flavours

Hi there, I have an app that I'm working on which is a white label application. One code base but multiple flavours.

With each flavour, the difference will be in the following files:

- stylesheet
- index
- environment.js

Is it possible to achieve this? and if so, how would I go about doing that? Currently what I have in place is one repo but with two app branches, each being a flavour. Its not ideal because when it comes to merging code between apps, I end up breaking my code.

Edited by: Rubashen Yegambaram on 24 Mar, 2017

Responses

3 Replies
Iqbal Hossain

hi~ 
You have to add a central html file which have to be declared in config.xml 
You can use this page as main page and then you can divide your app into different branches ... See the TAU Master details example on IDE Template. 

Rubashen Yegambaram

Hi Iqbal,

Thank you for your response to my question but the issue is that each flavour represents a package.

For example, there changes would be as such:

app1:
index.html
css
env.js
images

app1:
index.html
css
env.js
Images

All other files will remain the same but these apps are separate. The issue that we are currently faced with, is that between two developers working on a flavour each and most the time we are working on separate features, the code is committed to the repo in separate branches which means that I would need to pull down the branch that the change was committed to and then include that in the branch im working on.

Does that help understand my problem?

Iqbal Hossain

hi, 

you can make your structure like this 

WebApp
JS/
---main.js
Css/
----style.css
apps/
----app1/
--------index.html
--------app.js
--------style.css
----app2/
--------index.html
--------app.js
--------style.css
index.html
config.xml