blob: 0482be4043b7d8606bd0a3e3a804604b2e2196b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
const path = require("path");
function childProcessFork(path) {
const command = new Deno.Command(Deno.execPath(), {
args: ["run", "-A", path],
env: {
"DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE": Deno[Deno.internal].core.ops.op_npm_process_state(),
}
});
const child = command.spawn();
child.status.then(() => {
console.log("Done.");
});
}
module.exports = {
run() {
childProcessFork(path.join(__dirname, "forked_path.js"));
}
};
|