| 3 | const { exec } = require("node:child_process"); |
| 4 | |
| 5 | const build = (fileName) => { |
| 6 | if (fileName) console.log(fileName, "changed"); |
| 7 | else console.log("building without optimizations"); |
| 8 | queue = queue.then( |
| 9 | () => |
| 10 | new Promise((resolve) => { |
| 11 | exec( |
| 12 | "npm run build:stdlib && npm run build:plugins && npm run build:core", |
| 13 | { cwd: __dirname, env: { ...process.env, NO_MIN: true } }, |
| 14 | (error) => { |
| 15 | if (error) console.error(error); |
| 16 | else console.log(fileName || "", "build completed"); |
| 17 | resolve(); |
| 18 | }, |
| 19 | ); |
| 20 | }), |
| 21 | ); |
| 22 | }; |
| 23 | |
| 24 | const options = { |
| 25 | ignored: /\/(?:toml|plugins|pyscript)\.[mc]?js$/, |