mercredi 3 juin 2015

Two Different WebApps with one Source Code

Hope someone can help me figure out this.

I have 3 products that have almost the same interface, lets say Product A, B and C

What I want to do, if possible(through Gulp/Grunt/Other), is to create one source code and when building the final app, it will carry over to the dist folder the part for Produtc A, B C.

Example:

app/ js/ assets/ views/ dist/ ProdA/ ProdB/ ProdC/

Creating the build isn't the hard part, but how can I make my code so I can consume consume different API for each product.

Example:

Product A, B and C have status pages, A have (3 fields), B have all field from A (plus one) and C have fields completely different.

Do you guys have tips/tricks/guides so I can accomplish a similar task and reduce my code re-use?




Aucun commentaire:

Enregistrer un commentaire