From acb0062d5117a80c0a8e3b519157188c9894ea8d Mon Sep 17 00:00:00 2001 From: valere Date: Tue, 3 Sep 2024 22:00:55 +0200 Subject: [PATCH] atropos v1 --- components/atropos.vue | 33 +++++++++++++++++++++++++++++++++ pages/atropos.vue | 5 +++++ plugins/atropos.ts | 9 +++++++++ 3 files changed, 47 insertions(+) create mode 100644 components/atropos.vue create mode 100644 pages/atropos.vue create mode 100644 plugins/atropos.ts diff --git a/components/atropos.vue b/components/atropos.vue new file mode 100644 index 0000000..55e68e6 --- /dev/null +++ b/components/atropos.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/pages/atropos.vue b/pages/atropos.vue new file mode 100644 index 0000000..4ebbe4f --- /dev/null +++ b/pages/atropos.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/plugins/atropos.ts b/plugins/atropos.ts new file mode 100644 index 0000000..9596b95 --- /dev/null +++ b/plugins/atropos.ts @@ -0,0 +1,9 @@ +import { defineNuxtPlugin } from '#app'; + +export default defineNuxtPlugin(() => { + if (process.client) { + import('atropos/element').then(({ default: AtroposComponent }) => { + customElements.define('atropos-component', AtroposComponent); + }); + } +});