From a1ac3de8626cdbea9496d2a68e21c2ccea23cbe4 Mon Sep 17 00:00:00 2001 From: Arina Yakovenko Date: Mon, 8 Jul 2024 09:34:20 +0200 Subject: [PATCH] cjange some files --- app.vue | 274 ------------------ index.ts | 21 -- lib/index.js | 4 - package.json | 2 +- server/tsconfig.json | 3 - .../Ml/Accordion/MlAccordionBase.vue | 0 .../Ml/Accordion/MlAccordionContent.vue | 0 .../Ml/Accordion/MlAccordionHeader.vue | 0 .../Ml/Accordion/MlAccordionPanel.vue | 0 .../components}/Ml/Accordion/types.ts | 0 .../components}/Ml/Button/MlButton.vue | 0 .../components}/Ml/Button/types.ts | 0 .../components}/Ml/DropDown/MlDropDown.vue | 0 .../Ml/DropDown/MlDropDownItem.vue | 0 .../components}/Ml/DropDown/types.ts | 0 .../components}/Ml/Modal/MlModal.vue | 0 .../components}/Ml/Modal/types.ts | 0 .../components}/Ml/Paginator/MlPaginator.vue | 0 .../components}/Ml/Paginator/types.ts | 0 .../components}/Ml/Slider/MlSlider.vue | 0 .../components}/Ml/Slider/types.ts | 0 .../Ml/SliderPoint/MlSliderPoint.vue | 0 .../components}/Ml/SliderPoint/types.ts | 0 .../components}/Ml/Spinner/MlSpinner.vue | 0 .../Spinner/composables/useSpinnerClasses.ts | 0 .../components}/Ml/Spinner/types.ts | 0 .../components}/Ml/Tabber/MlTabberBase.vue | 0 .../components}/Ml/ThemeSwitch/MlDark.vue | 0 .../components}/Ml/ThemeSwitch/MlLight.vue | 0 .../Ml/ThemeSwitch/MlThemeSwitch.vue | 0 .../components}/Ml/ThemeSwitch/types.ts | 0 .../Ml/transition/MlTransitionFade.vue | 0 {composables => src/composables}/useBounce.ts | 0 .../composables}/useMergeClasses.ts | 0 {composables => src/composables}/useRipple.ts | 0 .../composables}/useTailwindConf.ts | 0 src/module.ts | 9 + webpack.config.js | 38 +++ 38 files changed, 48 insertions(+), 303 deletions(-) delete mode 100644 app.vue delete mode 100644 index.ts delete mode 100644 lib/index.js delete mode 100644 server/tsconfig.json rename {components => src/components}/Ml/Accordion/MlAccordionBase.vue (100%) rename {components => src/components}/Ml/Accordion/MlAccordionContent.vue (100%) rename {components => src/components}/Ml/Accordion/MlAccordionHeader.vue (100%) rename {components => src/components}/Ml/Accordion/MlAccordionPanel.vue (100%) rename {components => src/components}/Ml/Accordion/types.ts (100%) rename {components => src/components}/Ml/Button/MlButton.vue (100%) rename {components => src/components}/Ml/Button/types.ts (100%) rename {components => src/components}/Ml/DropDown/MlDropDown.vue (100%) rename {components => src/components}/Ml/DropDown/MlDropDownItem.vue (100%) rename {components => src/components}/Ml/DropDown/types.ts (100%) rename {components => src/components}/Ml/Modal/MlModal.vue (100%) rename {components => src/components}/Ml/Modal/types.ts (100%) rename {components => src/components}/Ml/Paginator/MlPaginator.vue (100%) rename {components => src/components}/Ml/Paginator/types.ts (100%) rename {components => src/components}/Ml/Slider/MlSlider.vue (100%) rename {components => src/components}/Ml/Slider/types.ts (100%) rename {components => src/components}/Ml/SliderPoint/MlSliderPoint.vue (100%) rename {components => src/components}/Ml/SliderPoint/types.ts (100%) rename {components => src/components}/Ml/Spinner/MlSpinner.vue (100%) rename {components => src/components}/Ml/Spinner/composables/useSpinnerClasses.ts (100%) rename {components => src/components}/Ml/Spinner/types.ts (100%) rename {components => src/components}/Ml/Tabber/MlTabberBase.vue (100%) rename {components => src/components}/Ml/ThemeSwitch/MlDark.vue (100%) rename {components => src/components}/Ml/ThemeSwitch/MlLight.vue (100%) rename {components => src/components}/Ml/ThemeSwitch/MlThemeSwitch.vue (100%) rename {components => src/components}/Ml/ThemeSwitch/types.ts (100%) rename {components => src/components}/Ml/transition/MlTransitionFade.vue (100%) rename {composables => src/composables}/useBounce.ts (100%) rename {composables => src/composables}/useMergeClasses.ts (100%) rename {composables => src/composables}/useRipple.ts (100%) rename {composables => src/composables}/useTailwindConf.ts (100%) create mode 100644 src/module.ts create mode 100644 webpack.config.js diff --git a/app.vue b/app.vue deleted file mode 100644 index f3d3a48..0000000 --- a/app.vue +++ /dev/null @@ -1,274 +0,0 @@ - - - diff --git a/index.ts b/index.ts deleted file mode 100644 index 59a49db..0000000 --- a/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { defineNuxtModule, addComponent } from "@nuxt/kit"; -import { resolve } from "path"; - -export default defineNuxtModule({ - meta: { - name: "my-module", - configKey: "myModule", - }, - setup() { - // Register the component globally - addComponent({ - name: "MlArror", - filePath: resolve( - __dirname, - "MlArror.vue", - "./components/Ml/Accordion/MlAccordionBase.vue", - "./components/Ml/Button/MlButton.vue" - ), - }); - }, -}); diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 3af1b0b..0000000 --- a/lib/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import { MlButton } from "../components/Ml/Button/MlButton.vue"; -import { MlPaginator } from "../components/Ml/Paginator/MlPaginator.vue"; - -export { MlButton, MlPaginator }; diff --git a/package.json b/package.json index 5cc02e7..4ff68ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt3-reusable-components", - "version": "1.1.2", + "version": "1.1.4", "private": false, "type": "module", "main": "lib/index.js", diff --git a/server/tsconfig.json b/server/tsconfig.json deleted file mode 100644 index b9ed69c..0000000 --- a/server/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../.nuxt/tsconfig.server.json" -} diff --git a/components/Ml/Accordion/MlAccordionBase.vue b/src/components/Ml/Accordion/MlAccordionBase.vue similarity index 100% rename from components/Ml/Accordion/MlAccordionBase.vue rename to src/components/Ml/Accordion/MlAccordionBase.vue diff --git a/components/Ml/Accordion/MlAccordionContent.vue b/src/components/Ml/Accordion/MlAccordionContent.vue similarity index 100% rename from components/Ml/Accordion/MlAccordionContent.vue rename to src/components/Ml/Accordion/MlAccordionContent.vue diff --git a/components/Ml/Accordion/MlAccordionHeader.vue b/src/components/Ml/Accordion/MlAccordionHeader.vue similarity index 100% rename from components/Ml/Accordion/MlAccordionHeader.vue rename to src/components/Ml/Accordion/MlAccordionHeader.vue diff --git a/components/Ml/Accordion/MlAccordionPanel.vue b/src/components/Ml/Accordion/MlAccordionPanel.vue similarity index 100% rename from components/Ml/Accordion/MlAccordionPanel.vue rename to src/components/Ml/Accordion/MlAccordionPanel.vue diff --git a/components/Ml/Accordion/types.ts b/src/components/Ml/Accordion/types.ts similarity index 100% rename from components/Ml/Accordion/types.ts rename to src/components/Ml/Accordion/types.ts diff --git a/components/Ml/Button/MlButton.vue b/src/components/Ml/Button/MlButton.vue similarity index 100% rename from components/Ml/Button/MlButton.vue rename to src/components/Ml/Button/MlButton.vue diff --git a/components/Ml/Button/types.ts b/src/components/Ml/Button/types.ts similarity index 100% rename from components/Ml/Button/types.ts rename to src/components/Ml/Button/types.ts diff --git a/components/Ml/DropDown/MlDropDown.vue b/src/components/Ml/DropDown/MlDropDown.vue similarity index 100% rename from components/Ml/DropDown/MlDropDown.vue rename to src/components/Ml/DropDown/MlDropDown.vue diff --git a/components/Ml/DropDown/MlDropDownItem.vue b/src/components/Ml/DropDown/MlDropDownItem.vue similarity index 100% rename from components/Ml/DropDown/MlDropDownItem.vue rename to src/components/Ml/DropDown/MlDropDownItem.vue diff --git a/components/Ml/DropDown/types.ts b/src/components/Ml/DropDown/types.ts similarity index 100% rename from components/Ml/DropDown/types.ts rename to src/components/Ml/DropDown/types.ts diff --git a/components/Ml/Modal/MlModal.vue b/src/components/Ml/Modal/MlModal.vue similarity index 100% rename from components/Ml/Modal/MlModal.vue rename to src/components/Ml/Modal/MlModal.vue diff --git a/components/Ml/Modal/types.ts b/src/components/Ml/Modal/types.ts similarity index 100% rename from components/Ml/Modal/types.ts rename to src/components/Ml/Modal/types.ts diff --git a/components/Ml/Paginator/MlPaginator.vue b/src/components/Ml/Paginator/MlPaginator.vue similarity index 100% rename from components/Ml/Paginator/MlPaginator.vue rename to src/components/Ml/Paginator/MlPaginator.vue diff --git a/components/Ml/Paginator/types.ts b/src/components/Ml/Paginator/types.ts similarity index 100% rename from components/Ml/Paginator/types.ts rename to src/components/Ml/Paginator/types.ts diff --git a/components/Ml/Slider/MlSlider.vue b/src/components/Ml/Slider/MlSlider.vue similarity index 100% rename from components/Ml/Slider/MlSlider.vue rename to src/components/Ml/Slider/MlSlider.vue diff --git a/components/Ml/Slider/types.ts b/src/components/Ml/Slider/types.ts similarity index 100% rename from components/Ml/Slider/types.ts rename to src/components/Ml/Slider/types.ts diff --git a/components/Ml/SliderPoint/MlSliderPoint.vue b/src/components/Ml/SliderPoint/MlSliderPoint.vue similarity index 100% rename from components/Ml/SliderPoint/MlSliderPoint.vue rename to src/components/Ml/SliderPoint/MlSliderPoint.vue diff --git a/components/Ml/SliderPoint/types.ts b/src/components/Ml/SliderPoint/types.ts similarity index 100% rename from components/Ml/SliderPoint/types.ts rename to src/components/Ml/SliderPoint/types.ts diff --git a/components/Ml/Spinner/MlSpinner.vue b/src/components/Ml/Spinner/MlSpinner.vue similarity index 100% rename from components/Ml/Spinner/MlSpinner.vue rename to src/components/Ml/Spinner/MlSpinner.vue diff --git a/components/Ml/Spinner/composables/useSpinnerClasses.ts b/src/components/Ml/Spinner/composables/useSpinnerClasses.ts similarity index 100% rename from components/Ml/Spinner/composables/useSpinnerClasses.ts rename to src/components/Ml/Spinner/composables/useSpinnerClasses.ts diff --git a/components/Ml/Spinner/types.ts b/src/components/Ml/Spinner/types.ts similarity index 100% rename from components/Ml/Spinner/types.ts rename to src/components/Ml/Spinner/types.ts diff --git a/components/Ml/Tabber/MlTabberBase.vue b/src/components/Ml/Tabber/MlTabberBase.vue similarity index 100% rename from components/Ml/Tabber/MlTabberBase.vue rename to src/components/Ml/Tabber/MlTabberBase.vue diff --git a/components/Ml/ThemeSwitch/MlDark.vue b/src/components/Ml/ThemeSwitch/MlDark.vue similarity index 100% rename from components/Ml/ThemeSwitch/MlDark.vue rename to src/components/Ml/ThemeSwitch/MlDark.vue diff --git a/components/Ml/ThemeSwitch/MlLight.vue b/src/components/Ml/ThemeSwitch/MlLight.vue similarity index 100% rename from components/Ml/ThemeSwitch/MlLight.vue rename to src/components/Ml/ThemeSwitch/MlLight.vue diff --git a/components/Ml/ThemeSwitch/MlThemeSwitch.vue b/src/components/Ml/ThemeSwitch/MlThemeSwitch.vue similarity index 100% rename from components/Ml/ThemeSwitch/MlThemeSwitch.vue rename to src/components/Ml/ThemeSwitch/MlThemeSwitch.vue diff --git a/components/Ml/ThemeSwitch/types.ts b/src/components/Ml/ThemeSwitch/types.ts similarity index 100% rename from components/Ml/ThemeSwitch/types.ts rename to src/components/Ml/ThemeSwitch/types.ts diff --git a/components/Ml/transition/MlTransitionFade.vue b/src/components/Ml/transition/MlTransitionFade.vue similarity index 100% rename from components/Ml/transition/MlTransitionFade.vue rename to src/components/Ml/transition/MlTransitionFade.vue diff --git a/composables/useBounce.ts b/src/composables/useBounce.ts similarity index 100% rename from composables/useBounce.ts rename to src/composables/useBounce.ts diff --git a/composables/useMergeClasses.ts b/src/composables/useMergeClasses.ts similarity index 100% rename from composables/useMergeClasses.ts rename to src/composables/useMergeClasses.ts diff --git a/composables/useRipple.ts b/src/composables/useRipple.ts similarity index 100% rename from composables/useRipple.ts rename to src/composables/useRipple.ts diff --git a/composables/useTailwindConf.ts b/src/composables/useTailwindConf.ts similarity index 100% rename from composables/useTailwindConf.ts rename to src/composables/useTailwindConf.ts diff --git a/src/module.ts b/src/module.ts new file mode 100644 index 0000000..836fceb --- /dev/null +++ b/src/module.ts @@ -0,0 +1,9 @@ +import { defineNuxtModule, addComponentsDir } from '@nuxt/kit' + +export default defineNuxtModule({ + setup(options, nuxt) { + addComponentsDir({ + path: '~/components/Ml', + }) + } +}) \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..765ac55 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,38 @@ +const webpack = require("webpack"); + +module.exports = { + entry: "./src/index.js", + output: { + path: "./dist/", + filename: "index.js", + library: "VuejsPaginate", + libraryTarget: "umd", + }, + resolve: { + extensions: ["", ".js", ".vue"], + }, + module: { + loaders: [ + { + test: /\.vue$/, + loader: "vue", + }, + { + test: /\.js$/, + loader: "babel", + include: __dirname, + exclude: /node_modules/, + }, + ], + }, + plugins: [ + new webpack.optimize.UglifyJsPlugin({ + minimize: true, + sourceMap: false, + mangle: true, + compress: { + warnings: false, + }, + }), + ], +};