paperbits / paperbits-demo

This repository shows an example how developers can use Paperbits to build web apps with rich content authoring capabilities.
https://demo.paperbits.io
MIT License
300 stars 90 forks source link

Add VueJS startup example #61

Closed dandansoysauce closed 4 years ago

dandansoysauce commented 4 years ago

I know there's already an example for a vuejs component, but I'd like to know if there's a possibility of adding vuejs example for a startup.

Thank you.

azaslonov commented 4 years ago

Hi Dani, could you please clarify what do you mean by startup? Are we talking about files like startup.runtime.ts?

dandansoysauce commented 4 years ago

@azaslonov yes, that's correct. Right now, I am initiating the vue app under startup.design.ts by calling new Vue({ el: "#app" }); after injector.resolve("autostart");

EDIT

I managed to make it run by adding the commented alias under webpack.designer.js and webpack.runtime.js. Now I can't seem to show the viewManager component. Vue is showing unknown custom element

EDIT 2

In addition, I am passing the viewManager to the constructor but it is undefined.

azaslonov commented 4 years ago

Looks like you're trying to do something with design-time experience, which might be pretty hard to run with Vue at the moment (still few things to be done on our side). The example that we have in this repo for Vue is a run-rime code (the code running on a published website), which is a much simpler case.

In order to help you better, it would be great to know what exactly you're trying to achieve/build. If you'd like we can discuss this offline, just shoot us an email to support@paperbits.io.

dandansoysauce commented 4 years ago

I've decided to go for KnockoutJS for easier implementation.