mirror of
https://github.com/yugasun/qrcode-decoder.git
synced 2026-08-12 20:27:56 +08:00
chore: update readme & ci
This commit is contained in:
@@ -9,6 +9,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
- feat/*
|
- feat/*
|
||||||
- fix/*
|
- fix/*
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ A tool for decoding qrcode.
|
|||||||
|
|
||||||
## Guide
|
## Guide
|
||||||
|
|
||||||
Use `npm` to install.
|
Use `pnpm` to install.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install --save qrcode-decoder
|
$ pnpm install --save qrcode-decoder
|
||||||
```
|
```
|
||||||
|
|
||||||
Using in webpack:
|
Using in webpack:
|
||||||
@@ -96,31 +96,31 @@ Stops the current `qr` from searching for a QRCode.
|
|||||||
Install dependencies:
|
Install dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install
|
$ pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
Build code:
|
Build code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm run build
|
$ pnpm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
Run unit test:
|
Run unit test:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm test
|
$ pnpm test
|
||||||
```
|
```
|
||||||
|
|
||||||
Modify version in `package.json`, run `release` script:
|
Modify version in `package.json`, run `release` script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm run release
|
$ pnpm run release
|
||||||
```
|
```
|
||||||
|
|
||||||
Publish
|
Publish
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm publish
|
$ pnpm publish
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
+8
-8
@@ -23,10 +23,10 @@
|
|||||||
|
|
||||||
## 使用者指南
|
## 使用者指南
|
||||||
|
|
||||||
通过 npm 下载安装代码
|
通过 pnpm 下载安装代码
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install --save qrcode-decoder
|
$ pnpm install --save qrcode-decoder
|
||||||
```
|
```
|
||||||
|
|
||||||
如果你是 webpack 等环境
|
如果你是 webpack 等环境
|
||||||
@@ -96,31 +96,31 @@ qr.decodeFromCamera(videoElem).then((res) => {
|
|||||||
首次运行需要先安装依赖
|
首次运行需要先安装依赖
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install
|
$ pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
一键打包生成生产代码
|
一键打包生成生产代码
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm run build
|
$ pnpm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
运行单元测试,浏览器环境需要手动测试,位于`test/browser`
|
运行单元测试,浏览器环境需要手动测试,位于`test/browser`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm test
|
$ pnpm test
|
||||||
```
|
```
|
||||||
|
|
||||||
修改 package.json 中的版本号,修改 README.md 中的版本号,修改 CHANGELOG.md,然后发布新版
|
修改 package.json 中的版本号,修改 README.md 中的版本号,修改 CHANGELOG.md,然后发布新版
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm run release
|
$ pnpm run release
|
||||||
```
|
```
|
||||||
|
|
||||||
将新版本发布到 npm
|
将新版本发布到 pnpm
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm publish
|
$ pnpm publish
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx,md}": [
|
"*.{ts,tsx,md}": [
|
||||||
"npm run prettier:fix",
|
"pnpm run prettier:fix",
|
||||||
"git add ."
|
"git add ."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user