This is a vue-cli 5.x.x plugin that prepares your app for deployment to Yle Drupal Distro.
What is does:
- Wraps the Vue render function inside an onMount function providing the
yleVisualisation
object - Automatically gives the app container unique name to prevent clashes when embedding several datavizes in the same article
- Localizes index.html to Swedish
- Adds scripts and dependencies required to deploy the app to AWS
- Configures devServer host and publicPath
- Adds options
yleDataviz.externalContent
andyleDataviz.darkMode
to package.json. Set these to true if your dataviz supports rendering in the app and/or dark mode
Add it to your project:
vue 3.x
$ vue add yddviz
For vue 2.x, use
$ vue add yddviz@3