From 3242b849f0123a396964cb077cf91d0a868349d4 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sat, 7 May 2022 16:38:31 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E8=B0=83=E6=95=B4=20=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E7=94=9F=E6=88=90=20plugin=20package=20=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit n --- pnpm-lock.yaml | 12 ++++++++++++ scripts/create/generator.ts | 6 +++++- .../template/src/client/clientAppEnhance.ts.tpl | 2 +- scripts/create/template/src/node/plugin.ts.tpl | 4 ++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4edd64da..21f080eb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,6 +86,18 @@ importers: sass-loader: 12.6.0 vue: 3.2.33 + packages/plugin-baidu-tongji: + specifiers: + '@vuepress/client': 2.0.0-beta.43 + '@vuepress/core': 2.0.0-beta.43 + '@vuepress/shared': 2.0.0-beta.43 + '@vuepress/utils': 2.0.0-beta.43 + dependencies: + '@vuepress/client': 2.0.0-beta.43 + '@vuepress/core': 2.0.0-beta.43 + '@vuepress/shared': 2.0.0-beta.43 + '@vuepress/utils': 2.0.0-beta.43 + packages/plugin-caniuse: specifiers: '@types/markdown-it': ^12.2.3 diff --git a/scripts/create/generator.ts b/scripts/create/generator.ts index 264db743..7b317756 100644 --- a/scripts/create/generator.ts +++ b/scripts/create/generator.ts @@ -56,7 +56,11 @@ const initPackage = async (config: ConfigOptions): Promise => { const { name, client } = config const pkgName = packageName(name) const targetDir = path.join(packagesRoot, pkgName) - const dependencies: string[] = ['@vuepress/core@next'] + const dependencies: string[] = [ + '@vuepress/core@next', + '@vuepress/utils@next', + '@vuepress/shared@next' + ] client && dependencies.push('@vuepress/client@next') spinner.start(chalk.cyan('Installing...')) diff --git a/scripts/create/template/src/client/clientAppEnhance.ts.tpl b/scripts/create/template/src/client/clientAppEnhance.ts.tpl index 548c14c5..1f8efeb1 100644 --- a/scripts/create/template/src/client/clientAppEnhance.ts.tpl +++ b/scripts/create/template/src/client/clientAppEnhance.ts.tpl @@ -1,5 +1,5 @@ import { defineClientAppEnhance } from '@vuepress/client' export default defineClientAppEnhance(({ router }) => { - + // do something }) diff --git a/scripts/create/template/src/node/plugin.ts.tpl b/scripts/create/template/src/node/plugin.ts.tpl index f03078cb..49cc2a53 100644 --- a/scripts/create/template/src/node/plugin.ts.tpl +++ b/scripts/create/template/src/node/plugin.ts.tpl @@ -1,6 +1,6 @@ -import type { Plugin, App } from '@vuepress/core' +import type { App, Plugin } from '@vuepress/core' {{#if client}} -import path from 'path' +import { path } from '@vuepress/utils' {{/if}} {{#if shared}} import type { {{ upperName }}Options } from '../shared'