diff --git a/package.json b/package.json index 67a9f0e..fc7c05e 100644 --- a/package.json +++ b/package.json @@ -22,13 +22,13 @@ "build:docs": "vp run --filter @antdv-next/docs build", "build:x": "vp run --filter @antdv-next/x build", "build:token": "vp run --filter @antdv-next/x build:token", - "pack:packages": "vp pm pack -r --filter \"./packages/*\" --filter \"!./packages/docs\"", - "publish:packages": "vp pm publish -r --filter \"./packages/*\" --filter \"!./packages/docs\" --access public --no-git-checks", - "publish:x": "vp run --filter @antdv-next/x build && vp pm publish --filter @antdv-next/x --access public --no-git-checks", - "publish:x-markdown": "vp run --filter @antdv-next/x-markdown build && vp pm publish --filter @antdv-next/x-markdown --access public --no-git-checks", - "publish:x-sdk": "vp run --filter @antdv-next/x-sdk build && vp pm publish --filter @antdv-next/x-sdk --access public --no-git-checks", - "publish:x-skill": "vp run --filter @antdv-next/x-skill build && vp pm publish --filter @antdv-next/x-skill --access public --no-git-checks", - "publish:x-card": "vp run --filter @antdv-next/x-card build && vp pm publish --filter @antdv-next/x-card --access public --no-git-checks", + "pack:packages": "node scripts/run-pm.mjs pack -r --filter \"./packages/*\" --filter \"!./packages/docs\"", + "publish:packages": "node scripts/run-pm.mjs publish -r --filter \"./packages/*\" --filter \"!./packages/docs\" --access public --no-git-checks", + "publish:x": "vp run --filter @antdv-next/x build && node scripts/run-pm.mjs publish --filter @antdv-next/x --access public --no-git-checks", + "publish:x-markdown": "vp run --filter @antdv-next/x-markdown build && node scripts/run-pm.mjs publish --filter @antdv-next/x-markdown --access public --no-git-checks", + "publish:x-sdk": "vp run --filter @antdv-next/x-sdk build && node scripts/run-pm.mjs publish --filter @antdv-next/x-sdk --access public --no-git-checks", + "publish:x-skill": "vp run --filter @antdv-next/x-skill build && node scripts/run-pm.mjs publish --filter @antdv-next/x-skill --access public --no-git-checks", + "publish:x-card": "vp run --filter @antdv-next/x-card build && node scripts/run-pm.mjs publish --filter @antdv-next/x-card --access public --no-git-checks", "bump:x": "vp exec bumpp packages/x/package.json --tag \"@antdv-next/x@\"", "bump:x-markdown": "vp exec bumpp packages/x-markdown/package.json --tag \"@antdv-next/x-markdown@\"", "bump:x-sdk": "vp exec bumpp packages/x-sdk/package.json --tag \"@antdv-next/x-sdk@\"", diff --git a/scripts/run-pm.mjs b/scripts/run-pm.mjs new file mode 100644 index 0000000..0cc981e --- /dev/null +++ b/scripts/run-pm.mjs @@ -0,0 +1,34 @@ +// Forward all arguments to `vp pm` (the Vite+ package-manager forwarder). +// +// Why this script exists: +// `vp pm` is only implemented by the full Vite+ CLI binary, not by the local +// `node_modules/.bin/vp` JS wrapper (which only covers core commands like +// dev/build/run/exec/install/...). When a package.json script is executed via +// `vp run