@wyttime04/react-vditor 0.1.0-alpha.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -1
- package/package.json +12 -2
package/README.md
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
以 [vditor](https://github.com/Vanessa219/vditor) 4.0.0 為基礎的 React 元件,**僅支援 GFM 語法,並可於完全離線的環境運作**。
|
|
4
4
|
|
|
5
|
-
- 直接使用上游原版 vditor,不維護 fork
|
|
6
5
|
- mermaid、數學式、echarts 等 GFM 以外的附加渲染一律停用,相關區塊以一般程式碼區塊呈現
|
|
7
6
|
- 執行期僅載入同源資源,不連線至任何 CDN
|
|
8
7
|
|
|
8
|
+
**Online Demo**:[wyttime04.github.io/react-vditor](https://wyttime04.github.io/react-vditor/)
|
|
9
|
+
|
|
10
|
+
**NPM Package**:[@wyttime04/react-vditor](https://www.npmjs.com/package/@wyttime04/react-vditor)
|
|
11
|
+
|
|
9
12
|
## 相容性
|
|
10
13
|
|
|
11
14
|
| 項目 | 版本 |
|
|
@@ -360,3 +363,25 @@ npm test # 建置測試頁、檢查型別,並執行 puppeteer 測
|
|
|
360
363
|
### 測試
|
|
361
364
|
|
|
362
365
|
測試會確認每個情境皆無外部請求、無 404、無頁面錯誤。若 puppeteer 未下載瀏覽器,會改用系統安裝的 Chrome。
|
|
366
|
+
|
|
367
|
+
### 發佈
|
|
368
|
+
|
|
369
|
+
套件由 `.github/workflows/publish-npm.yaml` 於 GitHub Release 發佈時,透過 npm trusted publishing(OIDC)發佈。
|
|
370
|
+
|
|
371
|
+
1. 執行 `npm version <patch|minor|major> --no-git-tag-version`,更新 `package.json` 與 `package-lock.json` 的版本號
|
|
372
|
+
2. 更新 `CHANGELOG.md`
|
|
373
|
+
3. 執行 `git commit -am "chore(release): <版本>"` 與 `git tag v<版本>`
|
|
374
|
+
4. 執行 `git push origin main v<版本>`
|
|
375
|
+
5. 以該 tag 建立 GitHub Release
|
|
376
|
+
|
|
377
|
+
workflow 會驗證 tag 與 `package.json` 的版本一致,並於測試與建置通過後發佈至 dist-tag `latest`。
|
|
378
|
+
|
|
379
|
+
> **預發佈版本**
|
|
380
|
+
>
|
|
381
|
+
> - 第 1 步改以 `npm version prerelease --preid alpha --no-git-tag-version` 遞增(例如 `0.1.0-alpha.1` → `0.1.0-alpha.2`),
|
|
382
|
+
> 或直接指定版本號,例如 `npm version 0.2.0-alpha.0 --no-git-tag-version`
|
|
383
|
+
> - 第 5 步建立 Release 時須勾選「Set as a pre-release」
|
|
384
|
+
> - dist-tag 取自版本號的識別字,例如 `1.0.0-beta.0` 發佈至 `beta`,不會變更 `latest`
|
|
385
|
+
> - 預發佈版本執行 `npm version patch` 會轉為對應的正式版本(例如 `0.1.0-alpha.2` → `0.1.0`)
|
|
386
|
+
|
|
387
|
+
首次使用前,須於 npmjs.com 套件設定的 Trusted Publisher 加入此 repo 與 workflow 檔名 `publish-npm.yaml`,並允許 `npm publish`。
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wyttime04/react-vditor",
|
|
3
|
-
"version": "0.1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React component for the Vditor Markdown editor, limited to GFM and fully offline",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"vditor",
|
|
8
|
+
"markdown",
|
|
9
|
+
"markdown-editor",
|
|
10
|
+
"editor",
|
|
11
|
+
"wysiwyg",
|
|
12
|
+
"gfm",
|
|
13
|
+
"offline"
|
|
14
|
+
],
|
|
5
15
|
"license": "MIT",
|
|
6
16
|
"repository": {
|
|
7
17
|
"type": "git",
|