电视剧我奇怪的17岁剧情介绍
2026-07-09 3388809
2026-07-09 0
npx 即可,不再需要绝对路径: 复制代码{
"mcpServers": {
"perf-analyzer": {
"command": "npx",
"args": ["-y", "mcp-perf-analyzer"]
}
}
}
-y 的作用是首次运行时自动确认下载,不需要用户手动交互。

files 字段(只发布 dist,不带源码) 复制代码"files": ["dist/", "README.md"]
不加的话会把 src/、node_modules/ 都传上去,体积很大。
prepublishOnly 脚本(发布前自动重新构建) 复制代码"scripts": {
"build": "tsc",
"dev": "tsx src/index.ts",
"start": "node dist/index.js",
"prepublishOnly": "npm run build"
}
复制代码"keywords": ["mcp", "bundle-analyzer", "performance", "webpack", "vite"],
"author": "你的名字",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/你的用户名/mcp-perf-analyzer"
}
复制代码# 1. 登录 npm
npm login# 2. 检查包名是否被占用
npm view mcp-perf-analyzer# 3. 发布(会自动触发 prepublishOnly 先构建)
npm publish --access public