Updated Home (markdown)
parent
da89c1439c
commit
67afb3cf55
14
Home.md
14
Home.md
@ -4,24 +4,16 @@
|
||||
|
||||
## 安装
|
||||
|
||||
1. 建立一个只有 `package:read` 权限的 PAT Token:
|
||||
2. 设定 [`~/.npmrc`][npmrc],加入下述内容并替换 `<刚申请的 PAT>` 为刚申请的 Token 值(如 `ghp_ABCDEF0123456789`):
|
||||
|
||||
```ini
|
||||
//npm.pkg.github.com/:_authToken=<刚申请的 PAT>
|
||||
@unlock-music:registry=https://npm.pkg.github.com
|
||||
```bash
|
||||
npm i --save @unlock-music-gh/joox-crypto
|
||||
```
|
||||
|
||||
3. 安装依赖 `npm i --save @unlock-music/joox-crypto`;
|
||||
|
||||
注:使用 GitHub Actions 构建时应该[不需要提供 auth token][ref_workflow]。
|
||||
|
||||
## 使用
|
||||
|
||||
参考 [`joox-decrypt`][ref_source]。
|
||||
|
||||
```js
|
||||
const jooxFactory = require('@unlock-music/joox-crypto');
|
||||
const jooxFactory = require('@unlock-music-gh/joox-crypto');
|
||||
|
||||
const data = new Uint8Array(...);
|
||||
const decryptor = jooxFactory(data, '00000000000000000000000000000000');
|
||||
|
Loading…
Reference in New Issue
Block a user