mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
chore(gulp): preserve color of app-scripts
This commit is contained in:
@ -158,8 +158,8 @@ export function runNgc(pathToConfigFile: string, done: Function) {
|
|||||||
let shellCommand = `node --max_old_space_size=8096 ${ngcPath} -p ${pathToConfigFile}`;
|
let shellCommand = `node --max_old_space_size=8096 ${ngcPath} -p ${pathToConfigFile}`;
|
||||||
|
|
||||||
exec(shellCommand, function(err, stdout, stderr) {
|
exec(shellCommand, function(err, stdout, stderr) {
|
||||||
console.log(stdout);
|
process.stdout.write(stdout);
|
||||||
console.log(stderr);
|
process.stderr.write(stderr);
|
||||||
done(err);
|
done(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -170,8 +170,8 @@ export function runTsc(pathToConfigFile: string, done: Function) {
|
|||||||
let shellCommand = `node --max_old_space_size=8096 ${tscPath} -p ${pathToConfigFile}`;
|
let shellCommand = `node --max_old_space_size=8096 ${tscPath} -p ${pathToConfigFile}`;
|
||||||
|
|
||||||
exec(shellCommand, function (err, stdout, stderr) {
|
exec(shellCommand, function (err, stdout, stderr) {
|
||||||
console.log(stdout);
|
process.stdout.write(stdout);
|
||||||
console.log(stderr);
|
process.stderr.write(stderr);
|
||||||
done(err);
|
done(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -182,8 +182,8 @@ export function runWebpack(pathToWebpackConfig: string, done: Function) {
|
|||||||
let shellCommand = `node --max_old_space_size=8096 ${webpackPath} --config ${pathToWebpackConfig} --display-error-details`;
|
let shellCommand = `node --max_old_space_size=8096 ${webpackPath} --config ${pathToWebpackConfig} --display-error-details`;
|
||||||
|
|
||||||
exec(shellCommand, function(err, stdout, stderr) {
|
exec(shellCommand, function(err, stdout, stderr) {
|
||||||
console.log(stdout);
|
process.stdout.write(stdout);
|
||||||
console.log(stderr);
|
process.stderr.write(stderr);
|
||||||
done(err);
|
done(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -219,15 +219,7 @@ export function runAppScriptsServe(testOrDemoName: string, appEntryPoint: string
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const args = ['./node_modules/.bin/ionic-app-scripts'].concat(scriptArgs);
|
const args = ['./node_modules/.bin/ionic-app-scripts'].concat(scriptArgs);
|
||||||
console.log(`node ${args.join(' ')}`);
|
console.log(`node ${args.join(' ')}`);
|
||||||
const spawnedCommand = spawn('node', args);
|
const spawnedCommand = spawn('node', args, {stdio: 'inherit'});
|
||||||
|
|
||||||
spawnedCommand.stdout.on('data', (buffer: Buffer) => {
|
|
||||||
console.log(buffer.toString());
|
|
||||||
});
|
|
||||||
|
|
||||||
spawnedCommand.stderr.on('data', (buffer: Buffer) => {
|
|
||||||
console.error(buffer.toString());
|
|
||||||
});
|
|
||||||
|
|
||||||
spawnedCommand.on('close', (code: number) => {
|
spawnedCommand.on('close', (code: number) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
|
Reference in New Issue
Block a user