ci: update scripts/create

添加说明文档
This commit is contained in:
pengzhanbo 2022-05-04 14:26:47 +08:00
parent 1d5196eca2
commit 118b05add1
2 changed files with 31 additions and 8 deletions

24
scripts/README.md Normal file
View File

@ -0,0 +1,24 @@
## scripts/autoInstall
检查各个 workspace package 中的 vuepress 相关依赖,并更新到最新版本。
``` sh
pnpm autoUpdate
```
## scripts/create
`packages/` 目录下生成一个新的 插件包
``` sh
pnpm pkg <package-name> [--option]
```
- `package-name` 插件名称
### Option
- `--client,-c` 是否生成 `client` 目录及其文件,默认不生成
- `--shared,-s` 是否生成 `shared` 目录及其文件,默认不生成
- `--help,-h` 显示帮助信息

View File

@ -1,19 +1,18 @@
import chalk from 'chalk'
export const getHelp = (): void => {
console.log(`
this command will generator a package to ${chalk.cyan('packages')}.
console.log(` this command will generator a package to ${chalk.cyan('packages')}.
command: ${chalk.green('pnpm pkg <package-name> [--options]')}
command: ${chalk.green('pnpm pkg <package-name> [-p]')}
${chalk.green('package-name')}:
options:
${chalk.green('package-name')}:
${chalk.green('--client, -c')}: ${chalk.cyan('client/')}
${chalk.green('--shared, -s')}: ${chalk.cyan('shared/')}
${chalk.green('--help, -h')}: show help message.
exp: ${chalk.green('pnpm pkg caniuse -p')}
exp: ${chalk.green('pnpm pkg caniuse -c -s')}
It will generator to ${chalk.cyan('packages/plugin-caniuse')}
`)
}