Skip to content

Commit

Permalink
Improve output, see phetsims/chipper#1247
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 19, 2022
1 parent 6806092 commit e0e874c
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions js/scripts/absolute-tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@ if ( !args || args.length === 0 ) {
const end = Date.now();
const elapsed = end - start;

const lines = results.stdout.trim().split( '\n' );
const mapped = lines.map( line => {
if ( results.stdout.trim().length === 0 ) {

return line.trim().split( args[ 1 ] ).join( process.cwd() + '/' );
} );
console.log( `0 errors in ${elapsed}ms` );
}
else {
const lines = results.stdout.trim().split( '\n' );
const mapped = lines.map( line => {

console.log( mapped.join( '\n' ) );
console.log( `${mapped.length} ${mapped.length === 1 ? 'error' : 'errors'} in ${elapsed}ms` );
return line.trim().split( args[ 1 ] ).join( process.cwd() + '/' );
} );

console.log( mapped.join( '\n' ) );
console.log( `${mapped.length} ${mapped.length === 1 ? 'error' : 'errors'} in ${elapsed}ms` );
}
} )();

0 comments on commit e0e874c

Please sign in to comment.