Closed ssendev closed 5 years ago
Sorry, I currently don't have the time, to test this, but you could give it a try for sure...
Hey, thanks for your PR, but personally I don't like this template approach...
If prefer the idea, you mentioned above
So did you try, simply changing this line?
I have pushed an update that uses the original plan. But the android
path is different than what's mentioned in the docs it's platforms/android/app/src/main/res/xml/config.xml
since i don't have a mac i can't tell if the ios
and osx
paths are right. Like before browser
dosn't need a config change so i omitted a browser path to avoid confusion.
Unfortunately it wasn't as easy as you suggested since in the prepare step the config is copied from config.xml
to platforms/.../config.xml
and undoes the change that was made before cordova run
with a lot of trial and error (in part due to my stupidness) I was able to figure out that the before_prepare
hook is executed after the config is overwritten and before it's read so i used that to overwrite the config.
Since cordova build
and cordova prepare
also reset the config i removed the config reverting on exit.
Hi @ssendev thanks for your investigation and PR, I merged it and released it on 2.1.4.
1) I also did some adaptions, I removed the cordovaConfigPaths
part, to keep backwards compatibility. So upgrading users, to need to do this manually.
I'm doing this on the fly during the serve command. To get VueExampleAppName
, I'm simply parsing the config.xml
2) For ios
and osx
the paths are same, so I adapted it.
3) Your <hook .../>
was not added on a new project, as you place the code before the cordova create
command
https://cordova.apache.org/docs/en/dev/config_ref/index.html mentions
app/www/config.xml
and plattform specific locations likeapp/platforms/android/res/xml/config.xml
could the hook modify these files instead so thatconfig.xml
isn't constantly marked as changed? or is the timing wrong and it's not possible to get a hook that modifies these files at the right time.