Installation
If you have not already created a Vue.js project, you can do so by typing:
npx nuxi@latest init my-app
cd my-app
Now that you have an instantiated project, you can add the component library.
Installing the library
If you have not yet connected to the Azure npm feed, follow instructions to do so here.
Then install the econnect component library using the following command:
npm install @econnect/webcomponents-library
Importing the components
Now that you have installed the component library, include it as a plugin. Don't forget to add the library css & fonts from cdn (or direct import)!
You can do so by creating ~/plugins/componentLibrary.ts:
import { defineNuxtPlugin } from '#app'
import componentsLibrary from '@econnect/webcomponents-library'
export default defineNuxtPlugin(({ vueApp }) => {
vueApp.use(componentsLibrary)
})
Testing your installation
Insecure about yourself or your installation?
You can test your installation using the testing component:
<template>
<e-iframe
url='https://www.youtube.com/embed/dQw4w9WgXcQ'
size='medium'
/>
</template>
<script lang="ts">
export default {
name: 'e-iframe'
}
</script>