import * as fs from "fs" ; function readArgumentsFile ( ) { try { const stat = fs . statSync ( "arguments.txt" ) ; if ( ! stat . isFile ( ) ) { return [ ] ; } } catch ( e ) { return [ ] ; } const content = fs . readFileSync ( "arguments.txt" ) ; const lines = content . toString ( ) . split ( "\n" ) ; const result = [ ] ; for ( const line of lines ) { if ( line . startsWith ( "#" ) ) { continue ; } const trimmed = line . trim ( ) ; if ( trimmed === "" ) { continue ; } result . push ( trimmed ) ; } return result ; } export function getArguments ( ) { let args = process . argv . splice ( 2 ) ; args = args . concat ( readArgumentsFile ( ) ) ; return args ; }