Inventsable / vue-cli3-CSInterface

Barebones Adobe CEP build for vue-cli-3/webpack
11 stars 1 forks source link

Remote hosting? #1

Open beachcomber opened 4 years ago

beachcomber commented 4 years ago

Hi thank you for this project.

I do have a question for you. Is it feasible or even possible to configure CEP panels to work remotely?

I have used your project to create an SPA portal that houses all my scripts. I would like to share this portal with my colleagues. However, to make it maintainable it should really be on its own webserver. I've tried a few different approaches but nothing so far has worked for me. Do you have any thoughts as to how this could be accomplished?

If it is possible I will of course share it and credit you.

Regards,

Rob

Inventsable commented 4 years ago

Hello. I've never tried this myself, but it may be possible depending on your needs for interacting with the host app.

I'd imagine that if you could send a message to an iframe and from inside one to it's parent, you could have an index.html similar to the current index-dev.html where you only need an iframe. Do you have anything you can show as is?

I have a version of these templates which provides fallbacks for browsers, allowing you to host them on their own site then use that address as the src of an iframe, allowing for things like this:

https://inventsable-panels.web.app/

Problem will be accessing window.__adobe_cep__ to do evalscript, but this could be possible still. I haven't tried myself!

Inventsable commented 4 years ago

Also, have you seen bombino? These are slightly older templates compared to the newest system, migration should be as easy as copy/pasting the src folder (though App.vue in new ones has newer methods)

https://github.com/Inventsable/bombino

Inventsable commented 4 years ago

@beachcomber, I made an attempt at this after realizing I might have been overcomplicating your initial request:

I've uploaded a demo panel here with two pages that have different working methods for fetching from a URL, but each assume that you're hosting your scripts on Github, and publicly. If you're wanting them to be totally secure and never exposed, I'd have to think on that more, but I'd love to hear any ideas or solutions you come up with since this would be a really nice dev feature to include in templates -- there's no need for anything like JSXBin if the script contents are never even exposed after all.

I assumed you just wanted source control though, in which case you could keep each script on some GitHub repo and dynamically run them in their most recent form above.

beachcomber commented 4 years ago

Thank you for your help - and my apologies for not responding sooner. - I've been sidelined by other projects for a couple of months. I will certainly look at your solution above with great interest. If I discover anything of interest I will certainly share it with you via a pull request.