ci: 调整 自动生成 plugin package 时的逻辑

n
This commit is contained in:
pengzhanbo 2022-05-07 16:38:31 +08:00
parent 0f7734825d
commit 3242b849f0
4 changed files with 20 additions and 4 deletions

12
pnpm-lock.yaml generated
View File

@ -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

View File

@ -56,7 +56,11 @@ const initPackage = async (config: ConfigOptions): Promise<void> => {
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...'))

View File

@ -1,5 +1,5 @@
import { defineClientAppEnhance } from '@vuepress/client'
export default defineClientAppEnhance(({ router }) => {
// do something
})

View File

@ -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'