From 232329a05c510fb4a8d474519764b66fa60bd7c8 Mon Sep 17 00:00:00 2001 From: Arina Yakovenko Date: Mon, 8 Jul 2024 12:16:28 +0200 Subject: [PATCH] add some files --- app.vue | 21 --------------------- modules/module.ts | 10 ++++++---- nuxt.config.ts | 4 ++-- package.json | 2 +- 4 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 app.vue diff --git a/app.vue b/app.vue deleted file mode 100644 index 90246ac..0000000 --- a/app.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/module.ts b/modules/module.ts index e009ee1..8317739 100644 --- a/modules/module.ts +++ b/modules/module.ts @@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, - addComponent, + addComponentsDir, } from "@nuxt/kit"; export interface ModuleOptions {} @@ -16,9 +16,11 @@ export default defineNuxtModule({ setup(_options, _nuxt) { const resolver = createResolver(import.meta.url); - addComponent({ - name: 'MlButton', - filePath: resolver.resolve('../src/components/Ml/Button/MlButton.vue') + addComponentsDir({ + path: resolver.resolve("../src/components/Ml"), + }); + addComponentsDir({ + path: resolver.resolve("../src/composables"), }); }, }); diff --git a/nuxt.config.ts b/nuxt.config.ts index db146d2..604f091 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,7 +1,7 @@ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ - css: ["~/assets/css/main.css"], - modules: ["@nuxtjs/tailwindcss", "@nuxtjs/color-mode", "~/modules/module"], + css: ["./assets/css/main.css"], + modules: ["@nuxtjs/tailwindcss", "@nuxtjs/color-mode", "./modules/module.ts"], compatibilityDate: "2024-04-03", devtools: { enabled: true }, colorMode: {}, diff --git a/package.json b/package.json index d4442d2..643c573 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt3-reusable-components", - "version": "1.2.3", + "version": "1.2.4", "private": false, "type": "module", "main": "index.js",