diff --git a/dist/module.d.ts b/dist/module.d.ts index eb794e1..40a178f 100644 --- a/dist/module.d.ts +++ b/dist/module.d.ts @@ -1,2 +1,5 @@ -export * from '/Users/jonathan/Git/nuxt-fullpage/src/module'; -export { default } from '/Users/jonathan/Git/nuxt-fullpage/src/module'; \ No newline at end of file +import * as _nuxt_schema from '@nuxt/schema'; + +declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions>; + +export { _default as default }; diff --git a/dist/module.mjs b/dist/module.mjs index 3cb9387..64536fa 100644 --- a/dist/module.mjs +++ b/dist/module.mjs @@ -1,2 +1,20 @@ -import jiti from 'jiti'; -export default jiti(null, { interopDefault: true })('/Users/jonathan/Git/nuxt-fullpage/src/module'); \ No newline at end of file +import { resolve } from 'path'; +import { fileURLToPath } from 'url'; +import { defineNuxtModule, addPlugin } from '@nuxt/kit'; + +const module = defineNuxtModule({ + meta: { + name: "@fullpage/nuxt-fullpage", + configKey: "@fullpage/nuxt-fullpage", + compatibility: { + nuxt: "^3.0.0" + } + }, + setup(options, nuxt) { + const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url)); + nuxt.options.build.transpile.push(runtimeDir); + addPlugin(resolve(runtimeDir, "plugin.client")); + } +}); + +export { module as default }; diff --git a/dist/runtime b/dist/runtime deleted file mode 120000 index ff9c0f6..0000000 --- a/dist/runtime +++ /dev/null @@ -1 +0,0 @@ -/Users/jonathan/Git/nuxt-fullpage/src/runtime \ No newline at end of file diff --git a/dist/runtime/plugin.client.d.ts b/dist/runtime/plugin.client.d.ts new file mode 100644 index 0000000..9f6deb8 --- /dev/null +++ b/dist/runtime/plugin.client.d.ts @@ -0,0 +1,3 @@ +import 'vue-fullpage.js/dist/style.css'; +declare const _default: any; +export default _default; diff --git a/dist/runtime/plugin.client.mjs b/dist/runtime/plugin.client.mjs new file mode 100644 index 0000000..ff2563f --- /dev/null +++ b/dist/runtime/plugin.client.mjs @@ -0,0 +1,6 @@ +import { defineNuxtPlugin } from "#app"; +import "vue-fullpage.js/dist/style.css"; +import VueFullPage from "vue-fullpage.js"; +export default defineNuxtPlugin((nuxtApp) => { + nuxtApp.vueApp.use(VueFullPage); +}); diff --git a/dist/types.d.ts b/dist/types.d.ts index 17f0904..3dbf1f7 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -1,11 +1,6 @@ -import { ModuleOptions, ModuleHooks } from './module' +import { } from './module' -declare module '@nuxt/schema' { - interface NuxtConfig { ['@fullpage/nuxt-fullpage']?: Partial } - interface NuxtOptions { ['@fullpage/nuxt-fullpage']?: ModuleOptions } - interface NuxtHooks extends ModuleHooks {} -} export { default } from './module'