From feb26a4bf1a31a39123047fd6a14fa4df207c63f Mon Sep 17 00:00:00 2001 From: zepumph Date: Thu, 19 May 2022 13:02:57 -0600 Subject: [PATCH] work on Windows too, https://github.com/phetsims/chipper/issues/1247 --- js/scripts/absolute-tsc.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/scripts/absolute-tsc.js b/js/scripts/absolute-tsc.js index 98bc06e0..ad35e6a6 100644 --- a/js/scripts/absolute-tsc.js +++ b/js/scripts/absolute-tsc.js @@ -10,13 +10,14 @@ * arguments: perennial/js/scripts/absolute-tsc.js ${dir with a tsconfig, like chipper/tsconfig/all} ${path to replace, like ../../../} * working dir: ${the root of the checkout, like /Users/samreid/apache-document-root/main/} * - * This makes the files paths clickable + * IMPORTANT!!! This makes the files paths clickable in Webstorm: * output filters: $FILE_PATH$\($LINE$\,$COLUMN$\) * * @author Sam Reid (PhET Interactive Simulations) */ const start = Date.now(); const execute = require( '../common/execute' ); +const path = require( 'path' ); const args = process.argv.slice( 2 ); if ( !args || args.length === 0 ) { @@ -43,7 +44,7 @@ if ( !args || args.length === 0 ) { const lines = results.stdout.trim().split( '\n' ); const mapped = lines.map( line => { - return line.trim().split( args[ 1 ] ).join( process.cwd() + '/' ); + return line.trim().split( args[ 1 ] ).join( process.cwd() + path.sep ).split( '/' ).join( path.sep ); } ); console.log( mapped.join( '\n' ) );