Is there a way to automate the creation of an app in WAB by reading config files?
We can place the custom widget source code in git, but every time we create an app we have to use the WAB GUI to set the app and widget configuration files, by hand.
Is there a way (a tutorial) to store these files separately (add them to our git repo) and then create a new WAB app automatically using these config files?
Solved! Go to Solution.
The answer, I've been told, is No, there is no way.
The answer, I've been told, is No, there is no way.
I'm not sure that's correct.
What I'm reading your question is: you make a new web app in builder, change config settings, then those get lost when you make a fresh new app, right? And that's the problem?
Recently I was working with this tutorial: create-a-new-controller-widget
If you look carefully, much of what the tutorial has you do is edit stuff in the ~/client/stemapp/ folder
These are the configuration files that provide the default copies of your widgets that get replicated across your widgets when you make them from scratch.
So I think you would need to the edit the configs for your widget in here: ~\client\stemapp\widgets and they *should* be the source configs for any fresh new apps built in WAB Developer edition.
Note that this is distinct from editing the widgets within ~\server\apps\[App #]\widgets because those are cloned copies derived from ~\client\stemapp\widgets
To add to Eric's reply. He is correct you can preset any widgets configuration by changing the widgets config.json in the stemapp and you can set any new apps main conguration by editing the client\stemapp\predefined-apps\default\config.json