Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jaw52 committed Mar 3, 2023
1 parent 11b1c3d commit 97c727c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ Wait for batch modification of suffix name of '. js'

## Instructions

### Scan path

If the directory name to be scanned is not src, you can use the relative path to specify it

```bash
# 相对路径
# relative path
Please specify the folder to be scanned ./example/src
Please specify the folder to be scanned example/src
Please specify the folder to be scanned ../example/src
```

##Ignore path
### Ignore path

Manually ignore the scanning of some paths. Refer to [fast-glob](https://github.com/mrmlnc/fast-glob#readme) for rules

Expand All @@ -41,4 +43,12 @@ npx @jaw52/transform-jsx-for-vite --ignore **/example/**
npx @jaw52/transform-jsx-for-vite --ignore **/.git/** --ignore **/example/**
# Or use commas(Recommended)
npx @jaw52/transform-jsx-for-vite --ignore **/.git/**,**/example/**
```

### Modify concurrency

Concurrent number of modification commands executed at the same time (default 5)

```bash
npx @jaw52/transform-jsx-for-vite --concurrency 10
```
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ npx @jaw52/transform-jsx-for-vite

## 使用

### 扫描路径

如果需要扫描的目录名称不是src,可以使用相对路径进行指定

```bash
Expand All @@ -32,7 +34,7 @@ npx @jaw52/transform-jsx-for-vite
请指定需要扫描的文件夹 ../example/src
```

## 忽略路径
### 忽略路径

手动忽略某些路径的扫描,规则参照[fast-glob](https://github.com/mrmlnc/fast-glob#readme)

Expand All @@ -44,3 +46,11 @@ npx @jaw52/transform-jsx-for-vite --ignore **/.git/** --ignore **/example/**
# 或者使用逗号隔开(推荐)
npx @jaw52/transform-jsx-for-vite --ignore **/.git/**,**/example/**
```

### 修改并发数

同一时间执行修改命令的并发数量(默认为5)

```bash
npx @jaw52/transform-jsx-for-vite --concurrency 10
```
2 changes: 1 addition & 1 deletion src/utils/loadArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const loadArgs = (): { ignore: string[]; concurrency: number } => {

const { options } = cli.parse() as { options: { ignore?: (string | boolean)[] | string | boolean; concurrency?: number } }

return { ignore: parseIgnore(options.ignore), concurrency: options.concurrency ?? 10 }
return { ignore: parseIgnore(options.ignore), concurrency: options.concurrency ?? 5 }
}
catch (error) {
consola.error(error)
Expand Down

0 comments on commit 97c727c

Please sign in to comment.