ci: update scripts/create
添加说明文档
This commit is contained in:
parent
1d5196eca2
commit
118b05add1
24
scripts/README.md
Normal file
24
scripts/README.md
Normal 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` 显示帮助信息
|
||||
@ -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')}
|
||||
`)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user