x3d-image
Version:
Render image files from X3D
17 lines (12 loc) • 501 B
JavaScript
;
const os = require ("os");
const path = require ("path");
const { spawn } = require ("child_process");
const cwd = process .cwd ();
const cmd = os .platform () === "win32" ? "npm.cmd" : "npm";
const args = [... process .argv .slice (2), cwd];
process .chdir (path .resolve (__dirname, ".."));
const p = spawn (cmd, ["start", "--silent", "--", btoa (JSON .stringify (args))], { shell: true });
p .stdout .pipe (process .stdout);
p .stderr .pipe (process .stderr);