File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
src/subsystems/nodejs/builders/granular Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 386386 if [ -f ./tsconfig.json ] \
387387 && node -e 'require("typescript")' &>/dev/null; then
388388 node ${ ./tsconfig-to-json.js }
389- ${ pkgs . jq } /bin/jq ".compilerOptions.preserveSymlinks = true" tsconfig.json \
390- | ${ pkgs . moreutils } /bin/sponge tsconfig.json
391389 fi
392390 '' ;
393391
Original file line number Diff line number Diff line change 11try {
2- console . log ( require . resolve ( "typescript" ) ) ;
3- } catch ( e ) {
4- console . error ( "typescript is not found" ) ;
5- process . exit ( e . code ) ;
2+ require . resolve ( "typescript" ) ;
3+ } catch ( e ) {
4+ process . exit ( 0 ) ;
65}
76
8- const ts = require ( "typescript" )
9- const fs = require ( 'fs' )
7+ const ts = require ( "typescript" ) ;
8+ const fs = require ( "fs" ) ;
109
1110try {
12- const data = fs . readFileSync ( ' tsconfig.json' , ' utf8' )
11+ const data = fs . readFileSync ( " tsconfig.json" , " utf8" ) ;
1312} catch ( err ) {
14- console . error ( err )
13+ console . error ( err ) ;
1514}
1615
17- config = ts . parseConfigFileTextToJson ( data )
18- newdata = JSON . stringify ( config )
19- fs . writeFileSync ( 'tsconfig.json' , newdata ) ;
16+ config = ts . parseConfigFileTextToJson ( data ) ;
17+
18+ // https://www.typescriptlang.org/tsconfig#preserveSymlinks
19+ config . compilerOptions . preserveSymlinks = true ;
20+
21+ fs . writeFileSync ( "tsconfig.json" , JSON . stringify ( config ) ) ;
You can’t perform that action at this time.
0 commit comments