ionic-team / ionic-package-hooks

Cordova hooks that you can run in Ionic Package
Other
68 stars 38 forks source link

Add suport for cordova-plugin-firebase #24

Closed rolandjitsu closed 7 years ago

rolandjitsu commented 7 years ago

This hook will make sure the required config files are copied to the appropriate destinations when building in the cloud.

rolandjitsu commented 7 years ago

@dwieeb any chance we can get this merged soon? I have an essential production app depending on this hook.

imhoffd commented 7 years ago

@rolandjitsu Yes, it looks good. I will merge it in and it will be available on Package servers momentarily. Thanks!

rolandjitsu commented 7 years ago

@dwieeb great, thanks.

rolandjitsu commented 7 years ago

@dwieeb I do have a question though. Does the ionic package command upload all the contents of the project to Ionic cloud? Or does it only upload the contents of www, resources, config.xml and package.json? Because if it does not, this hook would not work because the key files will not be uploaded since they live at the root.

And from the looks of it, ionic-app-lib at package.js#L225, only seems to upload the files that I have mentioned above.

So I wonder how should this be handled?

I really don't know what is the best way to tackle this.

rolandjitsu commented 7 years ago

Actually, adding the key files to www would work without having to add them to source control. Because the package command does require to build the app before, and building the app with @ionic/app-scripts allows you to specify a custom copy config file which we could use to copy the key files from root to www whenever the build is run.

What do you think about this?

imhoffd commented 7 years ago

@rolandjitsu Looks like you found out which files it sends. Your solution is great for today, but in general we're looking at a better way to manage all of this. 👍 Thanks!

rolandjitsu commented 7 years ago

@dwieeb I agree, this solution it's not quite what I'd imagine either. Hopefully, the Ionic team will keep this scenario in mind and provide a clean solution.