From 4dc8c5e1219e0d6f65d761baa07860f9e987245a Mon Sep 17 00:00:00 2001 From: higuaifan Date: Mon, 26 Feb 2024 21:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20[nuxt]=20add=20shuimo=20nuxt=20plug?= =?UTF-8?q?in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #64 --- cli/build/config/es.config.ts | 6 +- doc/app.vue | 12 ++- doc/modules/shuimo/index.ts | 33 ------- doc/modules/shuimo/plugin.ts | 17 ---- doc/nuxt.config.ts | 1 + doc/package.json | 6 +- lib/package.json | 3 +- lib/utils/install/importComponents.ts | 3 + package.json | 7 +- plugins/nuxt/README.md | 86 +++++++++++++++++++ plugins/nuxt/package.json | 35 ++++++++ plugins/nuxt/src/module.ts | 72 ++++++++++++++++ .../src/runtime}/components/MLoadingLogo.vue | 4 +- .../runtime}/components/MLoadingPreview.vue | 17 ++-- plugins/nuxt/src/runtime/directive.ts | 16 ++++ plugins/nuxt/src/utils/shuimoPath.ts | 15 ++++ plugins/nuxt/tsconfig.json | 3 + pnpm-workspace.yaml | 1 + 18 files changed, 264 insertions(+), 73 deletions(-) delete mode 100644 doc/modules/shuimo/index.ts delete mode 100644 doc/modules/shuimo/plugin.ts create mode 100644 plugins/nuxt/README.md create mode 100644 plugins/nuxt/package.json create mode 100644 plugins/nuxt/src/module.ts rename {doc/modules/shuimo => plugins/nuxt/src/runtime}/components/MLoadingLogo.vue (96%) rename {doc/modules/shuimo => plugins/nuxt/src/runtime}/components/MLoadingPreview.vue (56%) create mode 100644 plugins/nuxt/src/runtime/directive.ts create mode 100644 plugins/nuxt/src/utils/shuimoPath.ts create mode 100644 plugins/nuxt/tsconfig.json diff --git a/cli/build/config/es.config.ts b/cli/build/config/es.config.ts index 86b326d4..dcdabc89 100644 --- a/cli/build/config/es.config.ts +++ b/cli/build/config/es.config.ts @@ -6,10 +6,10 @@ * * 江湖的业务千篇一律,复杂的代码好几百行。 */ -import { defineConfig, normalizePath, PluginOption } from 'vite'; +import { defineConfig, normalizePath } from 'vite'; import fs from 'fs'; import path from 'path'; -import { baseRoot, buildConfig, fileName, getPath, plugins as basePlugins, rollupOptions } from './common.config'; +import { baseRoot, buildConfig, fileName, getPath, plugins as basePlugins } from './common.config'; const outputRoot = path.resolve(__dirname, '../../../lib/dist'); @@ -108,7 +108,7 @@ export class EsConfig { ...entries, 'index': getPath('./index.ts'), }, - } + }, }, }); } diff --git a/doc/app.vue b/doc/app.vue index 6352d6d1..56ec9c7e 100644 --- a/doc/app.vue +++ b/doc/app.vue @@ -1,8 +1,10 @@