Skip to content

Commit dfb27d7

Browse files
committed
Fix executable and properly output stdout and stderr.
1 parent f3c435d commit dfb27d7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

gulpfile.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@ function createExecTask(packageName, executable, args) {
9696
throw err;
9797
}
9898

99-
const process = child_process.spawn(binPath, args);
99+
const spawn = child_process.spawn(binPath, args);
100100

101-
process.stdout.on('data', (data) => {
102-
console.log(`stdout: ${data}`);
101+
spawn.stdout.on('data', (data) => {
102+
process.stdout.write(data);
103103
});
104104

105-
process.stderr.on('data', (data) => {
106-
console.log(`stderr: ${data}`);
105+
spawn.stderr.on('data', (data) => {
106+
process.stderr.write(data);
107107
});
108108

109-
process.on('close', (code) => {
109+
spawn.on('close', (code) => {
110110
if (code != 0) {
111111
throw new Error('Process failed with code ' + code);
112112
}
@@ -250,9 +250,9 @@ gulp.task(':clean:assets', function() {
250250
.pipe(gulpClean());
251251
});
252252

253-
gulp.task('lint', createExecTask('tslint', ['-c', 'tslint.json', '\'src/**/*.ts\'']));
253+
gulp.task('lint', createExecTask('tslint', ['-c', 'tslint.json', 'src/**/*.ts']));
254254
gulp.task('stylelint', createExecTask(
255-
'stylelint', ['stylelint', '\'src/**/*.scss\'', '--config stylelint-config.json', '--syntax scss']
255+
'stylelint', ['src/**/*.scss', '--config', 'stylelint-config.json', '--syntax', 'scss']
256256
));
257257

258258
/***************************************************************************************************

0 commit comments

Comments
 (0)