Skip to content

Commit

Permalink
更改名称
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 committed Nov 10, 2024
1 parent a14e2c9 commit 2099b55
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 16 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,31 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

Publish-Github:
needs: Release
runs-on: ubuntu-latest
permissions:
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
- run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
registry-url: "https://npm.pkg.github.com"

- name: Install Dependencies
run: pnpm i -r

- name: Build
run: pnpm build

- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_CONFIG_PROVENANCE: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CLI for uni-app
## 安装

```shell
npm i -g uni-app-cli
npm i -g @wtto00/uniapp-cli
```

## 用法
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ uniapp help create
```
Usage: uniapp create <project-name>
使用 uni-app-cli 创建新项目
使用 uniapp-cli 创建新项目
Arguments:
project-name 项目名称
Expand Down Expand Up @@ -46,7 +46,7 @@ Options:

## 项目模板

`uni-app-cli` 内置了几种模板:
`uniapp-cli` 内置了几种模板:

- [vitesse](https://github.com/uni-helper/vitesse-uni-app): 背靠 `Uni Helper` 团队,告别 `HBuilderX` ,拥抱现代前端开发
- [vue3-ts](https://github.com/dcloudio/uni-preset-vue/tree/vite-ts): `DCloud` 官方的 `vue3` + `typescript` 模板
Expand Down
12 changes: 6 additions & 6 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
::: code-group

```bash [npm]
npm i -g uni-app-cli
npm i -g @wtto00/uniapp-cli
```

```bash [pnpm]
pnpm add -g uni-app-cli
pnpm add -g @wtto00/uniapp-cli
```

```bash [yarn]
yarn global add uni-app-cli
yarn global add @wtto00/uniapp-cli
```

```bash [bun]
bun install -g uni-app-cli
bun install -g @wtto00/uniapp-cli
```

```bash [deno]
deno install -g npm:uni-app-cli
deno install -g npm:@wtto00/uniapp-cli
```

:::
Expand All @@ -41,7 +41,7 @@ uniapp --help
Usage: uniapp <command> [options]
Options:
-v, --version uni-app-cli 的版本号
-v, --version uniapp-cli 的版本号
-d, --verbose 调试模式,输出 debug 级别的日志信息
-h, --help 帮助信息
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "uni-app-cli",
"name": "@wtto00/uniapp-cli",
"version": "0.0.1-alpha",
"description": "CLI for uniapp.",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ App.init()

program
.name('uniapp')
.version(`uni-app-cli v${CLI_VERSION}`, '-v, --version', 'uni-app-cli 的版本号')
.version(`uniapp-cli v${CLI_VERSION}`, '-v, --version', 'uniapp-cli 的版本号')
.usage('<command> [options]')
.option('-d, --verbose', '调试模式,输出 debug 级别的日志信息')
.helpOption('-h, --help', '帮助信息')
Expand All @@ -20,7 +20,7 @@ program
.command('create')
.usage('<project-name>')
.summary('创建新项目')
.description('使用 uni-app-cli 创建新项目')
.description('使用 uniapp-cli 创建新项目')
.argument('<project-name>', '项目名称')
.option('-t, --template <template>', '新建项目的模板,是一个 Git 仓库地址')
.option('-f, --force', '如果目录已存在,强制覆盖')
Expand Down
2 changes: 1 addition & 1 deletion tests/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { execaUniapp, execaUniappSync } from './helper.js'

const HELP_TEXT = `Usage: uniapp create <project-name>
使用 uni-app-cli 创建新项目
使用 uniapp-cli 创建新项目
Arguments:
project-name 项目名称
Expand Down
2 changes: 1 addition & 1 deletion tests/help.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { execaUniapp } from './helper.js'
const HELP_TEXT = `Usage: uniapp <command> [options]
Options:
-v, --version uni-app-cli 的版本号
-v, --version uniapp-cli 的版本号
-d, --verbose 调试模式,输出 debug 级别的日志信息
-h, --help 帮助信息
Expand Down
4 changes: 2 additions & 2 deletions tests/version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ describe('version', async () => {

it('--version', { timeout: 10000 }, async () => {
const { stdout } = await execaUniapp('--version')
assert.strictEqual(stdout, `uni-app-cli v${packages.version}`)
assert.strictEqual(stdout, `uniapp-cli v${packages.version}`)
})

it('-v', { timeout: 10000 }, async () => {
const { stdout } = await execaUniapp('--version')
assert.strictEqual(stdout, `uni-app-cli v${packages.version}`)
assert.strictEqual(stdout, `uniapp-cli v${packages.version}`)
})
})

0 comments on commit 2099b55

Please sign in to comment.