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
/* | |
* Copyright 2012 The Closure Compiler Authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License") | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
// The possible output wrapper, which however does not | |
// allow to disable strict mode. | |
function() { | |
const DEPACK$child_process = require('child_process'); | |
%output% | |
}(this) |
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
import { fork } from 'child_process' | |
const { stdout, stderr } = fork('.', [], { | |
stdio: 'pipe', | |
execArgv: [], // for when debugging | |
}).on('error', (error) => { | |
console.log(error) | |
}) | |
stdout.pipe(process.stdout) |
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
// The package 'child_process' source code | |
export default DEPACK$child_process | |
export const { | |
ChildProcess, | |
exec, | |
execFile, | |
execFileSync, | |
execSync, | |
fork, | |
spawn, |
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
{"name":"child_process","main":"index.js","depack":"v8"} |
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
// tt.js (compiled code in PRETTY_PRINT) | |
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); |
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
/** | |
* @constructor | |
*/ | |
var Buffer = function() {} | |
Buffer.concat | |
var process | |
process.stdout | |
process.stderr | |
process.version |
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
// index.js | |
console.log('hello world') | |
console.warn(process.version) |
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
hello world | |
v8.13.0 |
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; |
OlderNewer