У меня монорепо с lerna и демо-сайт. Я хочу опубликовать sh измененные пакеты и автоматически обновить его в демоверсии из 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