-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
31 lines (26 loc) · 895 Bytes
/
build.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// const { exec } = require('child_process');
// const fs = require('fs');
// const packageDir = 'packages/ai-components';
// if (fs.existsSync(packageDir) && fs.lstatSync(packageDir).isDirectory()) {
// if (!fs.existsSync(`${packageDir}/rollup.config.js`)) {
// return;
// }
// process.chdir(packageDir);
// const command = 'pnpm build';
// const childProcess = exec(command);
// childProcess.stdout.on('data', (data) => {
// console.log(data);
// });
// childProcess.stderr.on('data', (data) => {
// console.error(data);
// });
// childProcess.on('exit', (code) => {
// if (code === 0) {
// console.log(`Command '${command}' executed successfully.`);
// } else {
// console.error(`Command '${command}' failed with exit code ${code}.`);
// }
// });
// } else {
// console.error(`Directory '${packageDir}' does not exist.`);
// }