From c517f0e07e33b5f331e8366e36e1a26ddc14b10c Mon Sep 17 00:00:00 2001 From: Benny Samir Hierl Date: Fri, 18 Feb 2022 20:45:22 +0100 Subject: [PATCH] component auto import added Signed-off-by: Benny Samir Hierl --- components.d.ts | 38 +++++++ package-lock.json | 162 ++++++++++++++++++++++++++++ package.json | 1 + src/App.vue | 2 - src/components/FormWishlist.vue | 9 +- src/components/FormWishlistItem.vue | 15 +-- src/components/Header.vue | 7 -- src/components/ImagePreview.vue | 2 - src/components/InputCheckbox.vue | 1 - src/components/InputFile.vue | 1 - src/components/Modal.vue | 1 - src/components/WishlistItem.vue | 3 - src/components/icons/index.ts | 16 --- src/components/index.ts | 12 --- src/views/DetailView.vue | 7 -- src/views/HomeView.vue | 1 - src/views/LoginView.vue | 4 +- src/views/NotFoundView.vue | 1 - tsconfig.json | 8 +- vite.config.ts | 8 +- 20 files changed, 219 insertions(+), 80 deletions(-) create mode 100644 components.d.ts delete mode 100644 src/components/icons/index.ts delete mode 100644 src/components/index.ts diff --git a/components.d.ts b/components.d.ts new file mode 100644 index 0000000..eab7a05 --- /dev/null +++ b/components.d.ts @@ -0,0 +1,38 @@ +// generated by unplugin-vue-components +// We suggest you to commit this file into source control +// Read more: https://github.com/vuejs/vue-next/pull/3399 + +declare module 'vue' { + export interface GlobalComponents { + ButtonBase: typeof import('./src/components/ButtonBase.vue')['default'] + FormWishlist: typeof import('./src/components/FormWishlist.vue')['default'] + FormWishlistItem: typeof import('./src/components/FormWishlistItem.vue')['default'] + Header: typeof import('./src/components/Header.vue')['default'] + IconCart: typeof import('./src/components/icons/IconCart.vue')['default'] + IconCloudQuestion: typeof import('./src/components/icons/IconCloudQuestion.vue')['default'] + IconCreation: typeof import('./src/components/icons/IconCreation.vue')['default'] + IconDelete: typeof import('./src/components/icons/IconDelete.vue')['default'] + IconError: typeof import('./src/components/icons/IconError.vue')['default'] + IconImagePlaceholder: typeof import('./src/components/icons/IconImagePlaceholder.vue')['default'] + IconLightDark: typeof import('./src/components/icons/IconLightDark.vue')['default'] + IconLink: typeof import('./src/components/icons/IconLink.vue')['default'] + IconLogin: typeof import('./src/components/icons/IconLogin.vue')['default'] + IconLogout: typeof import('./src/components/icons/IconLogout.vue')['default'] + IconNoGift: typeof import('./src/components/icons/IconNoGift.vue')['default'] + IconPencil: typeof import('./src/components/icons/IconPencil.vue')['default'] + IconSave: typeof import('./src/components/icons/IconSave.vue')['default'] + IconSpinner: typeof import('./src/components/icons/IconSpinner.vue')['default'] + IconToggleOff: typeof import('./src/components/icons/IconToggleOff.vue')['default'] + IconToggleOn: typeof import('./src/components/icons/IconToggleOn.vue')['default'] + ImagePreview: typeof import('./src/components/ImagePreview.vue')['default'] + ImageTile: typeof import('./src/components/ImageTile.vue')['default'] + InputCheckbox: typeof import('./src/components/InputCheckbox.vue')['default'] + InputFile: typeof import('./src/components/InputFile.vue')['default'] + InputText: typeof import('./src/components/InputText.vue')['default'] + InputTextArea: typeof import('./src/components/InputTextArea.vue')['default'] + Modal: typeof import('./src/components/Modal.vue')['default'] + WishlistItem: typeof import('./src/components/WishlistItem.vue')['default'] + } +} + +export {} diff --git a/package-lock.json b/package-lock.json index ba8b053..5d401fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,11 +49,24 @@ "tailwindcss": "^3.0.22", "ts-node": "^10.5.0", "typescript": "~4.5.5", + "unplugin-vue-components": "^0.17.18", "vite": "^2.8.1", "vitest": "^0.3.4", "vue-tsc": "^0.31.3" } }, + "node_modules/@antfu/utils": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.4.0.tgz", + "integrity": "sha512-gqkpvjkgFUu+s3kP+Ly33OKpo5zvVY3FDFhv5BIb98SncS3KD6DNxPfNDjwHIoyXbz1leWo1j8DtRLZ1D2Jv+Q==", + "dev": true, + "dependencies": { + "@types/throttle-debounce": "^2.1.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -408,6 +421,19 @@ "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009.tgz", "integrity": "sha512-5Dh+qTDhpPR66w6NNAnPs+/W/Qt4r1DSd+qhfPFcDThUK4uxoZKGlPb2IYQn5LL+18aIGnmteDf7BnVMmvBNSQ==" }, + "node_modules/@rollup/pluginutils": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", + "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, "node_modules/@rushstack/eslint-patch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.0.tgz", @@ -554,6 +580,12 @@ "@types/node": "*" } }, + "node_modules/@types/throttle-debounce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz", + "integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.11.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz", @@ -6563,6 +6595,72 @@ "node": ">= 4.0.0" } }, + "node_modules/unplugin": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-0.3.2.tgz", + "integrity": "sha512-5d0DMYNKZU+S9eZUiBfw6Co32eRg8myUgBPoWSqG/wDFCUE/WznfSsJnZWi1P9l69x4uLJqt2qVq1xW/AsXFrw==", + "dev": true, + "dependencies": { + "webpack-virtual-modules": "^0.4.3" + }, + "peerDependencies": { + "esbuild": ">=0.13", + "rollup": "^2.50.0", + "vite": "^2.3.0", + "webpack": "4 || 5" + }, + "peerDependenciesMeta": { + "esbuild": { + "optional": true + }, + "rollup": { + "optional": true + }, + "vite": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/unplugin-vue-components": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-0.17.18.tgz", + "integrity": "sha512-4wvJnSShTXCnZpO1G6h0DlHjBXap0JqzFyU84guMT6EH0shUZZ3TAta4pDa8nNeWAtcJVTF9uQswePq1elhpKQ==", + "dev": true, + "dependencies": { + "@antfu/utils": "^0.4.0", + "@rollup/pluginutils": "^4.1.2", + "chokidar": "^3.5.2", + "debug": "^4.3.3", + "fast-glob": "^3.2.11", + "local-pkg": "^0.4.1", + "magic-string": "^0.25.7", + "minimatch": "^3.0.4", + "resolve": "^1.21.0", + "unplugin": "^0.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@babel/parser": "^7.15.8", + "@babel/traverse": "^7.15.4", + "vue": "2 || 3" + }, + "peerDependenciesMeta": { + "@babel/parser": { + "optional": true + }, + "@babel/traverse": { + "optional": true + } + } + }, "node_modules/upath": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", @@ -7048,6 +7146,12 @@ "node": ">=12" } }, + "node_modules/webpack-virtual-modules": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz", + "integrity": "sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==", + "dev": true + }, "node_modules/whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", @@ -7308,6 +7412,15 @@ } }, "dependencies": { + "@antfu/utils": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.4.0.tgz", + "integrity": "sha512-gqkpvjkgFUu+s3kP+Ly33OKpo5zvVY3FDFhv5BIb98SncS3KD6DNxPfNDjwHIoyXbz1leWo1j8DtRLZ1D2Jv+Q==", + "dev": true, + "requires": { + "@types/throttle-debounce": "^2.1.0" + } + }, "@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -7578,6 +7691,16 @@ "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.9.0-58.bcc2ff906db47790ee902e7bbc76d7ffb1893009.tgz", "integrity": "sha512-5Dh+qTDhpPR66w6NNAnPs+/W/Qt4r1DSd+qhfPFcDThUK4uxoZKGlPb2IYQn5LL+18aIGnmteDf7BnVMmvBNSQ==" }, + "@rollup/pluginutils": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz", + "integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==", + "dev": true, + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, "@rushstack/eslint-patch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.0.tgz", @@ -7710,6 +7833,12 @@ "@types/node": "*" } }, + "@types/throttle-debounce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz", + "integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { "version": "5.11.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.11.0.tgz", @@ -12149,6 +12278,33 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "unplugin": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-0.3.2.tgz", + "integrity": "sha512-5d0DMYNKZU+S9eZUiBfw6Co32eRg8myUgBPoWSqG/wDFCUE/WznfSsJnZWi1P9l69x4uLJqt2qVq1xW/AsXFrw==", + "dev": true, + "requires": { + "webpack-virtual-modules": "^0.4.3" + } + }, + "unplugin-vue-components": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-0.17.18.tgz", + "integrity": "sha512-4wvJnSShTXCnZpO1G6h0DlHjBXap0JqzFyU84guMT6EH0shUZZ3TAta4pDa8nNeWAtcJVTF9uQswePq1elhpKQ==", + "dev": true, + "requires": { + "@antfu/utils": "^0.4.0", + "@rollup/pluginutils": "^4.1.2", + "chokidar": "^3.5.2", + "debug": "^4.3.3", + "fast-glob": "^3.2.11", + "local-pkg": "^0.4.1", + "magic-string": "^0.25.7", + "minimatch": "^3.0.4", + "resolve": "^1.21.0", + "unplugin": "^0.3.0" + } + }, "upath": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", @@ -12523,6 +12679,12 @@ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true }, + "webpack-virtual-modules": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz", + "integrity": "sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==", + "dev": true + }, "whatwg-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", diff --git a/package.json b/package.json index 925c807..a2a27e1 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "tailwindcss": "^3.0.22", "ts-node": "^10.5.0", "typescript": "~4.5.5", + "unplugin-vue-components": "^0.17.18", "vite": "^2.8.1", "vitest": "^0.3.4", "vue-tsc": "^0.31.3" diff --git a/src/App.vue b/src/App.vue index f002b5f..ad49977 100644 --- a/src/App.vue +++ b/src/App.vue @@ -32,8 +32,6 @@ diff --git a/tsconfig.json b/tsconfig.json index da454f9..5b54943 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,5 +22,11 @@ "module": "commonjs" } }, - "include": ["vite.config.*", "env.d.ts", "src/**/*", "src/**/*.vue"] + "include": [ + "vite.config.*", + "env.d.ts", + "src/**/*", + "src/**/*.vue", + "components.d.ts" + ] } diff --git a/vite.config.ts b/vite.config.ts index 8770854..af3235b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,11 +1,17 @@ import { fileURLToPath, URL } from 'url' +import Components from 'unplugin-vue-components/vite' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [ + vue(), + Components({ + dts: true, + }), + ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)),