Skip to content

Commit 34b24a6

Browse files
fix: fix npx run error
1 parent 7c11115 commit 34b24a6

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openapi-ts-request': patch
3+
---
4+
5+
fix: fix npx run error

README-en_US.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ pnpm i openapi-ts-request -D
2727

2828
### CosmiConfig
2929

30-
create ```openapi-ts-request.config.ts``` file in the project root directory
31-
> the config file also supports ***.openapi-ts-request.ts***, ***openapi-ts-request.config.cjs*** format, reference [cosmiconfig](https://github.com/cosmiconfig/cosmiconfig?tab=readme-ov-file#cosmiconfig)
30+
create ```openapi-ts.config.ts``` file in the project root directory
31+
> the config file also supports ***.openapi-ts.ts***, ***openapi-ts.config.cjs*** format, reference [cosmiconfig](https://github.com/cosmiconfig/cosmiconfig?tab=readme-ov-file#cosmiconfig)
3232
3333
```ts
3434
export default {
@@ -51,7 +51,7 @@ export default [
5151
]
5252
```
5353

54-
add the command in ```script``` of ```package.json```: ```"openapi": "openapi-ts-request",```
54+
add the command in ```script``` of ```package.json```: ```"openapi": "openapi-ts",```
5555

5656
generate result:
5757

@@ -61,7 +61,7 @@ npm run openapi
6161

6262
### JS
6363

64-
create a new ```openapi-ts-request.config.js``` file in any directory ```xxx/xxx```
64+
create a new ```openapi-ts.config.js``` file in any directory ```xxx/xxx```
6565

6666
```ts
6767
const { generateService } = require('openapi-ts-request')
@@ -72,7 +72,7 @@ generateService({
7272
})
7373
```
7474

75-
add the command in ```script``` of ```package.json```: ```"openapi": "node xxx/xxx/openapi-ts-request.config.js"```
75+
add the command in ```script``` of ```package.json```: ```"openapi": "node xxx/xxx/openapi-ts.config.js"```
7676

7777
generate result:
7878

@@ -82,7 +82,7 @@ npm run openapi
8282

8383
### TS
8484

85-
create a new ```openapi-ts-request.config.ts``` file in any directory ```xxx/xxx```
85+
create a new ```openapi-ts.config.ts``` file in any directory ```xxx/xxx```
8686

8787
```ts
8888
const { generateService } = require('openapi-ts-request')
@@ -93,7 +93,7 @@ generateService({
9393
})
9494
```
9595

96-
add the command in ```script``` of ```package.json```: ```"openapi": "ts-node xxx/xxx/openapi-ts-request.config.ts",```
96+
add the command in ```script``` of ```package.json```: ```"openapi": "ts-node xxx/xxx/openapi-ts.config.ts",```
9797

9898
generate result:
9999

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ pnpm i openapi-ts-request -D
2727

2828
### CosmiConfig
2929

30-
在项目根目录新建 ```openapi-ts-request.config.ts```
31-
> 配置文件还支持 ***.openapi-ts-request.ts***, ***openapi-ts-request.config.cjs*** 等格式,参考 [cosmiconfig](https://github.com/cosmiconfig/cosmiconfig?tab=readme-ov-file#cosmiconfig)
30+
在项目根目录新建 ```openapi-ts.config.ts```
31+
> 配置文件还支持 ***.openapi-ts.ts***, ***openapi-ts.config.cjs*** 等格式,参考 [cosmiconfig](https://github.com/cosmiconfig/cosmiconfig?tab=readme-ov-file#cosmiconfig)
3232
3333
```ts
3434
export default {
@@ -51,7 +51,7 @@ export default [
5151
]
5252
```
5353

54-
```package.json``````script``` 中添加命令: ```"openapi": "openapi-ts-request",```
54+
```package.json``````script``` 中添加命令: ```"openapi": "openapi-ts",```
5555

5656
生成结果:
5757

@@ -61,7 +61,7 @@ npm run openapi
6161

6262
### JS
6363

64-
任意目录 ```xxx/xxx``` 新建 ```openapi-ts-request.config.js```
64+
任意目录 ```xxx/xxx``` 新建 ```openapi-ts.config.js```
6565

6666
```ts
6767
const { generateService } = require('openapi-ts-request')
@@ -72,7 +72,7 @@ generateService({
7272
})
7373
```
7474

75-
```package.json``````script``` 中添加命令: ```"openapi": "node xxx/xxx/openapi-ts-request.config.js"```
75+
```package.json``````script``` 中添加命令: ```"openapi": "node xxx/xxx/openapi-ts.config.js"```
7676

7777
生成结果:
7878

@@ -82,7 +82,7 @@ npm run openapi
8282

8383
### TS
8484

85-
任意目录 ```xxx/xxx``` 新建 ```openapi-ts-request.config.ts```
85+
任意目录 ```xxx/xxx``` 新建 ```openapi-ts.config.ts```
8686

8787
```ts
8888
const { generateService } = require('openapi-ts-request')
@@ -93,7 +93,7 @@ generateService({
9393
})
9494
```
9595

96-
```package.json``````script``` 中添加命令: ```"openapi": "ts-node xxx/xxx/openapi-ts-request.config.ts",```
96+
```package.json``````script``` 中添加命令: ```"openapi": "ts-node xxx/xxx/openapi-ts.config.ts",```
9797

9898
生成结果:
9999

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"types": "dist/index.d.ts",
1414
"bin": {
1515
"openapi": "dist/bin/openapi.js",
16-
"openapi-ts-request": "dist/bin/cli.js"
16+
"openapi-ts": "dist/bin/cli.js"
1717
},
1818
"files": [
1919
"dist",

0 commit comments

Comments
 (0)