我有一个带有两个工作区的 yarn 2 工作区项目:
|-foo
\-bar
现在,在 rootpackage.json
中,我引入了共同的开发依赖项:
"devDependencies": {
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-typescript": "^5.0.2",
"@types/jest": "^26.0.13",
"nollup": "^0.13.10",
"rimraf": "^3.0.2",
"rollup": "^2.23.1",
"ts-jest": "^26.3.0",
"tslib": "^2.0.1",
"typescript": "^4.0.2"
}
我现在如何轻松(没有太多样板)从 foo 和 bar 的 package.json 中的脚本中引用汇总等?
示例:foo/package.json
"build": "rollup ...",
写“../node_modules/.bin/rollup”很糟糕。
注意,我不想全局安装汇总等。