【发布时间】:2020-12-17 11:35:27
【问题描述】:
目标
我想在我的package.json 中显示来自package-scripts.js 的nps 命令的cmets,如下所示:
试过
我实际上不知道这个覆盖的内容(“通过'npm test'命令运行”)来自哪里(vscode、npm、nps?)。我查找了他们所有的 GitHub 存储库,但没有成功。
我尝试通过以下方式添加 cmets,但没有结果:
// package-scripts.js
module.exports = {
scripts: {
/** Build image */
build: "docker build"
}
}
// package.json
{
scripts: {
"build": "nps build"
}
}
有可能吗?显示的评论是如何做出的?
【问题讨论】:
-
在 nps 的 package-scripts 示例 文档中查看 parallel scripts 的示例。也许是 nps-utils 包通过它的 concurrent 方法实现的。
标签: npm package.json jsdoc npm-scripts