Lerna:如何获得成功发布的软件包?

时间:2020-04-08 12:08:31

标签: javascript node.js lerna

我在lerna和演示网站上拥有monorepo。 我想发布更改的软件包,并通过npm run release之类的1条命令在演示中自动对其进行更新。 package.json:

...
"scripts": {
  "release": "node ./release.js",
  ...
}

release.js

const { spawnSync } = require('child_process');

const cmd = `npx lerna publish`;
const updatedPackages = spawnSync(cmd, { stdio: 'inherit', shell: true }); // there i want get list of successfully published packages.

udpdateDemo(updatedPackages); // custom function, which get list of packages and update it for demo

0 个答案:

没有答案