File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
22#
3+ # /bin/bash transpile.sh transpile.ignore
4+ # /bin/bash transpile.sh transpile.ignore --watch
35# /bin/bash transpile.sh
46# /bin/bash transpile.sh --watch
57#
8+ # That script is responsible just for transpiling
9+ #
610
711find . -type d \( \
812 -name node_modules \
Original file line number Diff line number Diff line change @@ -9,11 +9,16 @@ const th = (msg: string) => new Error(`transpile.ts error: ${msg}`);
99
1010const watch = process . argv . includes ( "--watch" ) ;
1111
12- const ignoreFile = "transpile.ignore" ;
13- if ( ! fs . existsSync ( ignoreFile ) ) {
14- throw th ( `${ ignoreFile } doesn't exist` ) ;
12+ const ignoreFileArg = process . argv [ 2 ] ;
13+
14+ let ignore : any = { accepts : ( ) => true } ;
15+
16+ if ( ignoreFileArg ) {
17+ if ( ! fs . existsSync ( ignoreFileArg ) ) {
18+ throw th ( `${ ignoreFileArg } doesn't exist` ) ;
19+ }
20+ ignore = gitignore . compile ( fs . readFileSync ( ignoreFileArg , "utf8" ) ) ;
1521}
16- const ignore = gitignore . compile ( fs . readFileSync ( ignoreFile , "utf8" ) ) ;
1722
1823async function getEntryPointsFromStdin ( ) : Promise < string [ ] > {
1924 const rl = readline . createInterface ( {
You can’t perform that action at this time.
0 commit comments