# stcheck

> 檢查代碼中的簡體字或繁體字工具

Latest version **2.0.0** (published 2022-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install stcheck
pnpm add stcheck
yarn add stcheck
bun add stcheck
```

Provides the command `stcheck`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-09-15 |
| First published | 2019-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 51.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Grant |
| Maintainers | chengtian |
| Keywords | 简体, 簡體, 繁体, 繁體, stcheck |

## Links

- npm: https://www.npmjs.com/package/stcheck
- Repository: https://github.com/CHENGTIANG/stcheck
- Homepage: https://github.com/CHENGTIANG/stcheck#readme
- Issues: https://github.com/CHENGTIANG/stcheck/issues
- npm.io page: https://npm.io/package/stcheck

## Dependencies (3)

- [yargs](https://npm.io/package/yargs.md) ^14.2.0
- [globby](https://npm.io/package/globby.md) ^11.0.4
- [strip-comments](https://npm.io/package/strip-comments.md) ^2.0.1

## Recent versions

- 2.0.0 (latest) — 2022-09-15
- 1.0.4 — 2020-01-12
- 1.0.3 — 2020-01-12
- 1.0.2 — 2019-12-15
- 1.0.1 — 2019-10-31
- 1.0.0 — 2019-10-26

## README

# 安裝

使用`npm`安裝:

```bash
npm install --save-dev stcheck
npm install stcheck -g //全局安裝
```

使用`yarn`安裝:

```bash
yarn add stcheck --dev
yarn global add stcheck  //全局安裝
```

# 介紹
幫助你檢查代碼中的簡體字或繁體字。

#適用場景
* 項目需支持多語言（分簡體中文與繁體中文），需要檢查多語言文本是否正確。
* 因工作與生活需要，經常切換電腦輸入法簡體/繁體輸入，導致項目中文本混合使用了簡體中文與繁體中文，需要找出相關字眼修改。


# 開始使用
#### 配置文件
在項目根目錄下創建 ```st.config.json``` 文件，内容參考以下例子：
```
{
  "patterns": [
    "./**/*.(ts|js|tsx|jsx|vue|html)",
    "!**/node_modules/**",
    "!git/**"
  ],
  "gitignore": true,
  "ignoreTexts": ["简体中文"],
  "ignoreComments": true
}
```

屬性  | 描述 | 默認值
------------- | ------------- | -------------
patterns  | glob模式匹配文件 | []
gitignore | 支持`.gitignore` | false
ignoreTexts | 忽略的文本 | []
ignoreComments | 是否忽略註釋 | true


#### 然後在總端運行

方式一：
```bash
./node_modules/.bin/stcheck
```

方式二：
```
//在你的項目package.json文件scripts對象中添加："stcheck": "stcheck"， 如下：
{
  "name": "MyProject",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "stcheck": "stcheck",
  },
  "dependencies": {
  },
  "devDependencies": {
    "stcheck": "^x.x.x",
  }
}

//然后在终端运行以下命令
npm run stcheck
```






# 例子：
```
//檢查簡體字（type默認‘S’）
./node_modules/.bin/stcheck --type S 


//檢查繁體字
./node_modules/.bin/stcheck --type T --config st2.config.json

```

---
_Source: https://npm.io/package/stcheck · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
