Created
December 5, 2018 05:56
-
-
Save zavr-1/3253e4d4e5c0d0148239448d01779762 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// internals: [ 'child_process' ] | |
const requires = internals.map((key) => { | |
return `const DEPACK$${key} = require('${key}');` | |
}).join('\n') | |
const data = `${requires}\n${stdout}` | |
/* | |
const DEPACK$child_process = require('child_process'); | |
'use strict'; | |
const {fork:a} = DEPACK$child_process; | |
const {stdout:b, stderr:c} = a('.', [], {stdio:'pipe', execArgv:[]}).on('error', (d) => { | |
console.log(d); | |
}); | |
b.pipe(process.stdout); | |
c.pipe(process.stderr); | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment