vite-plugin-taro 0.1.5 → 0.1.7

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.
Files changed (3) hide show
  1. package/README.en.md +14 -5
  2. package/README.md +14 -5
  3. package/package.json +4 -4
package/README.en.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # vite-plugin-taro
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/vite-plugin-taro.svg)](https://www.npmjs.com/package/vite-plugin-taro)
4
+ ![Vite compatibility](https://registry.vite.dev/api/badges?package=vite-plugin-taro&tool=vite)
4
5
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
6
 
6
7
  [简体中文](README.md) | English
@@ -495,7 +496,8 @@ Common scripts:
495
496
  | `pnpm build:sample:h5` | Build the H5 sample app to `packages/loan-genius/dist/h5`. |
496
497
  | `pnpm preview:sample:h5` | Preview the built H5 sample. |
497
498
  | `pnpm publish:dry` | Dry-run package validation and publishing. |
498
- | `pnpm publish:all` | Publish the public packages in dependency order. |
499
+ | `pnpm release <version\|bump>` | Validate, bump versions, create the release commit and tag, and push to trigger CI publishing. |
500
+ | `pnpm publish:all` | Publish the public packages in dependency order; mainly used by the tag-based Trusted Publishing workflow. |
499
501
 
500
502
  ## Limitations
501
503
 
@@ -517,18 +519,25 @@ Common scripts:
517
519
 
518
520
  ## Release workflow
519
521
 
520
- Validate the publishable packages before publishing:
522
+ This repository publishes automatically with npm Trusted Publishing and GitHub Actions. Normal pushes to `main` do not publish; only tags matching `v*.*.*` trigger `.github/workflows/publish.yml`.
523
+
524
+ Create a release:
521
525
 
522
526
  ```sh
523
- pnpm publish:dry
527
+ pnpm release patch
524
528
  ```
525
529
 
526
- Publish all public packages in the required order:
530
+ `pnpm release` requires a clean `main` working tree, runs `pnpm version:bump`, validates with `pnpm publish:dry -- --no-git-check`, creates the `chore: release vX.Y.Z` commit and `vX.Y.Z` tag, then pushes the branch and tag to trigger CI. You can also release an exact version or prerelease:
527
531
 
528
532
  ```sh
529
- pnpm publish:all
533
+ pnpm release 0.2.0
534
+ pnpm release prerelease --preid beta
535
+ pnpm release patch --dry-run
536
+ pnpm release patch --no-push
530
537
  ```
531
538
 
539
+ CI runs `pnpm publish:all -- --no-git-check`, packs packages in dependency order, and publishes public packages through npm OIDC. Do not configure `NPM_TOKEN` for the publish workflow; each npm package's Trusted Publisher should point to `publish.yml`.
540
+
532
541
  ## License
533
542
 
534
543
  MIT
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # vite-plugin-taro
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/vite-plugin-taro.svg)](https://www.npmjs.com/package/vite-plugin-taro)
4
+ ![Vite compatibility](https://registry.vite.dev/api/badges?package=vite-plugin-taro&tool=vite)
4
5
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
6
 
6
7
  简体中文 | [English](README.en.md)
@@ -495,7 +496,8 @@ pnpm typecheck
495
496
  | `pnpm build:sample:h5` | 将 H5 示例应用构建到 `packages/loan-genius/dist/h5`。 |
496
497
  | `pnpm preview:sample:h5` | 预览构建后的 H5 示例。 |
497
498
  | `pnpm publish:dry` | 干运行包校验和发布流程。 |
498
- | `pnpm publish:all` | 按依赖顺序发布公开包。 |
499
+ | `pnpm release <version\|bump>` | 验证发布、更新版本、创建 release commit 和 tag,并推送触发 CI 发布。 |
500
+ | `pnpm publish:all` | 按依赖顺序发布公开包;主要由基于 tag 的 Trusted Publishing 工作流调用。 |
499
501
 
500
502
  ## 限制
501
503
 
@@ -517,18 +519,25 @@ pnpm typecheck
517
519
 
518
520
  ## 发布流程
519
521
 
520
- 发布前先验证可发布包:
522
+ 本仓库使用 npm Trusted Publishing 和 GitHub Actions 自动发布。普通推送到 `main` 不会发布;只有推送匹配 `v*.*.*` 的 tag 才会触发 `.github/workflows/publish.yml`。
523
+
524
+ 创建发布:
521
525
 
522
526
  ```sh
523
- pnpm publish:dry
527
+ pnpm release patch
524
528
  ```
525
529
 
526
- 按必要顺序发布所有公开包:
530
+ `pnpm release` 会要求干净的 `main` 工作区,运行 `pnpm version:bump`,执行 `pnpm publish:dry -- --no-git-check` 验证,创建 `chore: release vX.Y.Z` commit 和 `vX.Y.Z` tag,然后推送 branch 与 tag 触发 CI。也可以发布精确版本或预发布版本:
527
531
 
528
532
  ```sh
529
- pnpm publish:all
533
+ pnpm release 0.2.0
534
+ pnpm release prerelease --preid beta
535
+ pnpm release patch --dry-run
536
+ pnpm release patch --no-push
530
537
  ```
531
538
 
539
+ CI 会运行 `pnpm publish:all -- --no-git-check`,按依赖顺序打包并通过 npm OIDC 发布公开包。不要为发布工作流配置 `NPM_TOKEN`;每个 npm 包的 Trusted Publisher 应指向 `publish.yml`。
540
+
532
541
  ## 许可证
533
542
 
534
543
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-taro",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "author": "sep2",
5
5
  "description": "Vite 8 plugin for building one React/Taro codebase for WeChat Mini Program and H5 targets.",
6
6
  "type": "module",
@@ -64,8 +64,8 @@
64
64
  "babel-plugin-transform-taroapi": "^4.2.0",
65
65
  "tailwindcss": "^4.3.1",
66
66
  "weapp-tailwindcss": "^5.0.13",
67
- "@tarojs/plugin-framework-react": "npm:vite-plugin-taro-plugin-framework-react@0.1.5",
68
- "@tarojs/react": "npm:vite-plugin-taro-react@0.1.5"
67
+ "@tarojs/plugin-framework-react": "npm:vite-plugin-taro-plugin-framework-react@0.1.7",
68
+ "@tarojs/react": "npm:vite-plugin-taro-react@0.1.7"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": "^19.0.0",
@@ -79,7 +79,7 @@
79
79
  "vite": "^8.0.16"
80
80
  },
81
81
  "scripts": {
82
- "build": "node ../../scripts/sync-plugin-readme.mjs && rm -rf dist && tsgo --project tsconfig.json",
82
+ "build": "node ../../scripts/sync-plugin-readme.ts && rm -rf dist && tsgo --project tsconfig.json",
83
83
  "typecheck": "tsgo --project tsconfig.json --noEmit"
84
84
  }
85
85
  }