Skip to content

Commit 25fc39d

Browse files
authored
Merge pull request #187 from 142vip/feat/fairy-cli-update
feat(@142vip/fairy-cli): 代码清理,模块结构优化
2 parents 80f31cf + 08df8bd commit 25fc39d

File tree

8 files changed

+11
-12
lines changed

8 files changed

+11
-12
lines changed

packages/fairy-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"email": "mmdapl@163.com"
1010
},
1111
"license": "MIT",
12-
"homepage": "https://github.com/142vip/core-x/tree/main/packages/fairy-cli",
12+
"homepage": "https://142vip.github.io/core-x/packages/fairy-cli/",
1313
"repository": {
1414
"type": "git",
15-
"url": "https://github.com/142vip/core-x",
15+
"url": "git+https://github.com/142vip/core-x.git",
1616
"directory": "packages/fairy-cli"
1717
},
1818
"bugs": {

packages/fairy-cli/src/commands/deploy.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ function execDeploy(args: DeployOptions) {
1313
* github page 静态页面部署
1414
* @constructor
1515
*/
16-
function DeployGithubPage() {
17-
18-
}
16+
function DeployGithubPage() {}
1917

2018
/**
2119
*

packages/fairy-cli/src/commands/login.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ async function execLogin(platform: LoginPlatformEnum, args: LoginOptions) {
3939
}
4040
}
4141

42-
// docker 登录
42+
/**
43+
* docker 登录
44+
*/
4345
async function loginDocker(args: DockerOptions) {
4446
let registryUrl = RegistryURLEnum.DOCKER as string
4547
if (args.registryUrl != null) {
@@ -56,7 +58,9 @@ async function loginDocker(args: DockerOptions) {
5658
await commandStandardExecutor(command)
5759
}
5860

59-
// npm 登录
61+
/**
62+
* npm 登录
63+
*/
6064
async function loginNpm(args: NpmOptions) {
6165
let registryUrl = RegistryURLEnum.NPM as string
6266
if (args.registryUrl != null) {

packages/fairy-cli/src/commands/publish.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ async function publishNpm(args: NpmOptions) {
5858

5959
/**
6060
* publish 命令入口
61-
* @param program
6261
*/
6362
export async function publishMain(program: Command) {
6463
program

packages/fairy-cli/src/commands/release.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
// execute?: string
2424
// package?: string
2525
// }
26+
2627
interface ReleaseOptions extends Pick<VersionBumpOptions, 'preid' | 'tag' | 'commit' | 'push' | 'all' | 'execute'> {
2728
package?: string
2829
}

packages/fairy-cli/src/commands/turbopack.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ async function execTurboPack(repoNames: string[], args: TurboPackOptions) {
3131
* 获取需要执行命令的repo
3232
* - 支持多个--filter
3333
* - 支持所有repo
34-
* @param repoNames
3534
*/
3635
function getFilterRepo(repoNames: string[]) {
3736
return repoNames.map(name => `--filter=${name}`).join(' ')
3837
}
3938

4039
/**
4140
* turbo命令入口
42-
* @param program
4341
*/
4442
export async function turboPackMain(program: Command) {
4543
program

packages/fairy-cli/src/fairy-cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export async function fairyCliMain() {
4949
// fairy-cli turbo 基于turborepo项目管理
5050
await turboPackMain(program)
5151

52+
// fairy-cli clean
5253
await cleanUpMain(program)
5354

54-
// 参数解析
5555
program.parse(process.argv)
5656
}

packages/fairy-cli/src/shared/release-package.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ interface ValidatePkgJSON {
2121
* 参考:
2222
* - pnpm 命令: https://pnpm.io/cli/list
2323
* - filter参数: https://pnpm.io/filtering
24-
*
2524
*/
2625
export function getReleasePkgJSON(filter?: string | string[]) {
2726
try {

0 commit comments

Comments
 (0)