mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
build: 优化 scripts/create 生成插件包流程
This commit is contained in:
parent
32e759400d
commit
d0c0950b89
@ -29,7 +29,7 @@ const generatorFile = async (config: ConfigOptions): Promise<void> => {
|
||||
shared,
|
||||
version: pkg.version,
|
||||
}
|
||||
const include = [!client && 'client', !shared && 'shared'].filter(Boolean).join('|')
|
||||
const include = [!client && 'client', !client && 'tsconfig.esm.json', !shared && 'shared'].filter(Boolean).join('|')
|
||||
const filterRE = new RegExp(`/(${include})/`)
|
||||
const templates = templateList.filter(({ file }) => {
|
||||
return !filterRE.test(file)
|
||||
|
||||
@ -7,6 +7,7 @@ yarn add @vuepress-plume/vuepress-{{ pkgName }}
|
||||
## Usage
|
||||
``` js
|
||||
// .vuepress/config.js
|
||||
const {{ lowerName }}Plugin = require('@vuepress-plume/vuepress-{{ pkgName }}')
|
||||
module.exports = {
|
||||
//...
|
||||
plugins: [
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"references": [
|
||||
{{#if client}}
|
||||
{
|
||||
"path": "./tsconfig.esm.json"
|
||||
},
|
||||
{{/if}}
|
||||
{
|
||||
"path": "./tsconfig.cjs.json"
|
||||
}
|
||||
|
||||
@ -6,7 +6,9 @@
|
||||
"outDir": "./lib"
|
||||
},
|
||||
"include": [
|
||||
"./src/node",
|
||||
"./src/shared"
|
||||
{{#if shared}}
|
||||
"./src/shared",
|
||||
{{/if}}
|
||||
"./src/node"
|
||||
]
|
||||
}
|
||||
|
||||
@ -9,7 +9,9 @@
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"./src/client",
|
||||
"./src/shared"
|
||||
{{#if shared}}
|
||||
"./src/shared",
|
||||
{{/if}}
|
||||
"./src/client"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user