首页 > 解决方案 > Lerna:我怎样才能获得成功发布的包?

问题描述

我正在使用带有 lerna 和演示网站的 monorepo。我想发布更改的包并在演示中从 1 个命令(如npm run release. 包.json:

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

发布.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

标签: javascriptnode.jslerna

解决方案


推荐阅读