提交 161073b2 编写于 作者: J Johannes Rieken

use cp.fork

上级 03eb7931
...@@ -244,14 +244,15 @@ function createTscCompileTask(watch) { ...@@ -244,14 +244,15 @@ function createTscCompileTask(watch) {
const createReporter = require('./lib/reporter').createReporter; const createReporter = require('./lib/reporter').createReporter;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const args = ['./node_modules/.bin/tsc', '-p', './src/tsconfig.monaco.json', '--noEmit']; const args = ['-p', './src/tsconfig.monaco.json', '--noEmit'];
if (watch) { if (watch) {
args.push('-w'); args.push('-w');
} }
const child = cp.spawn(`node`, args, { const child = cp.fork('./node_modules/.bin/tsc', args, {
cwd: path.join(__dirname, '..'), cwd: path.join(__dirname, '..'),
// stdio: [null, 'pipe', 'inherit'] silent: true
}); });
let errors = []; let errors = [];
let reporter = createReporter(); let reporter = createReporter();
let report; let report;
...@@ -274,10 +275,8 @@ function createTscCompileTask(watch) { ...@@ -274,10 +275,8 @@ function createTscCompileTask(watch) {
// e.g. src/vs/base/common/strings.ts(663,5): error TS2322: Type '1234' is not assignable to type 'string'. // e.g. src/vs/base/common/strings.ts(663,5): error TS2322: Type '1234' is not assignable to type 'string'.
let fullpath = path.join(root, match[1]); let fullpath = path.join(root, match[1]);
let message = match[3]; let message = match[3];
// @ts-ignore
reporter(fullpath + message); reporter(fullpath + message);
} else { } else {
// @ts-ignore
reporter(str); reporter(str);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册