How to use cross-spawn.spawn:
GitHub: blitz-js/blitz
107 108 109 110 111 112 113 114 115
debug(`postinstall trigger: ${getPostInstallTrigger()}`) }) } function run(cmd, params, cwd = process.cwd(), stdio = ["pipe", "inherit", "inherit"]) { const child = childProcess.spawn(cmd, params, { stdio, cwd, })
736
0
104
See more examples
How to use cross-spawn.sync:
GitHub: Next2D/create-next2d-app
71 72 73 74 75 76 77 78 79 80
const checkThatNpmCanReadCwd = function () { const cwd = process.cwd(); let childOutput = null; try { childOutput = spawn.sync("npm", ["config", "list"]).output.join(""); } catch (err) { return true; }
How to use cross-spawn._parse:
GitHub: duanemcguire/mcpiano
22 23 24 25 26 27 28 29 30 31 32 33
return env; }; const handleArgs = (file, args, options = {}) => { const parsed = crossSpawn._parse(file, args, options); file = parsed.command; args = parsed.args; options = parsed.options;