hpi-schul-cloud / schulcloud-content-editor

Schul-Cloud Content Editor
https://schul-cloud.github.io/schulcloud-content-editor
GNU Affero General Public License v3.0
5 stars 1 forks source link

Exportieren von einzelnen Komponenten #27

Closed adrianjost closed 6 years ago

adrianjost commented 6 years ago

Wie kann man einzelne .vue Komponenten in den bestehenden Schul-Cloud Client einbinden?

Optionen:

  1. https://forum-archive.vuejs.org/topic/5306/using-vue-components-in-an-existing-none-vue-based-site/2
  2. https://www.vuejsradar.com/tips-for-integrating-vuejs-to-legacy-site/
  3. https://www.npmjs.com/package/express-vue
  4. https://mindthecode.com/using-vue-components-in-your-express-app/
adrianjost commented 6 years ago

Current Status: can compile simple .vue files at runtime https://github.com/schul-cloud/schulcloud-client/commit/05d9f4dff3f0e26b0793442a8382c95f8858a0ea

Testbranch: https://github.com/schul-cloud/schulcloud-client/commits/seminar-vue-search-test

adrianjost commented 6 years ago

Plugins (liek Vue-Material, Vee-validate, ...) are currently not supported (source). We need to find any other way. I think the best way is to use in any way the files that were build with webpack here. If we can serve the compiled files with express, everything should be fine.

adrianjost commented 6 years ago

Using an simple iFrame on schulcloud-client with a query string that tells our vue app to be displayed without the AppShell seems to work fine. For this solution, it's important that both sites uses the same domain. If using a subdomain for the content service you need to set document.domain (link).

At the moment, this looks like the best option we have.

adrianjost commented 6 years ago

It's done! 😄 pull description