mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-24 05:02:24 +08:00
15 lines
331 B
JavaScript
15 lines
331 B
JavaScript
|
import { exec } from 'child_process';
|
||
|
|
||
|
export const listOfPackages = () =>
|
||
|
new Promise((res, rej) => {
|
||
|
const command = `npx lerna list --json`;
|
||
|
exec(command, (e, result) => {
|
||
|
if (e) {
|
||
|
rej(e);
|
||
|
} else {
|
||
|
const data = JSON.parse(result.toString().trim());
|
||
|
res(data);
|
||
|
}
|
||
|
});
|
||
|
});
|