把 tabbit2api 发布到 npm 官方 registry,并确保用户可以通过下面两种方式使用:
npx tabbit2apinpm i -g tabbit2api
tabbit2api如果本机默认使用镜像 registry,发布时必须显式指定 npm 官方源:
npm login --registry=https://registry.npmjs.org检查当前包名是否已经存在:
npm view tabbit2api --registry=https://registry.npmjs.org运行测试:
npm test检查发布内容:
npm pack --dry-run --json --registry=https://registry.npmjs.org验证 tarball 的 npx / npm exec 调用路径:
npm pack --registry=https://registry.npmjs.org
npm exec --yes --package .\\tabbit2api-<version>.tgz -- tabbit2api --version验证临时全局安装:
npm install -g --prefix "$env:TEMP\\tabbit2api-global" .\\tabbit2api-<version>.tgz
"$env:TEMP\\tabbit2api-global\\tabbit2api.cmd" doctor验证运行时自检和健康检查:
tabbit2api doctor
tabbit2api start
curl.exe http://127.0.0.1:50124/healthnpm publish --registry=https://registry.npmjs.org --access public检查 registry:
npm view tabbit2api version --registry=https://registry.npmjs.org检查命令入口:
npx tabbit2api --version- 本仓库不使用
prepare自动安装 husky - 开发者如需提交校验,手动执行:
npm run hooks:install