fix(core): update
This commit is contained in:
		
							
								
								
									
										18
									
								
								ts/index.ts
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								ts/index.ts
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ import { CompilerOptions } from 'typescript'; | |||||||
|  |  | ||||||
| const defaultTsNodeOptions: tsNode.CreateOptions = { | const defaultTsNodeOptions: tsNode.CreateOptions = { | ||||||
|   compilerOptions: { |   compilerOptions: { | ||||||
|     lib: ['es2017'], |     lib: ['es2016', 'es2017', 'dom'], | ||||||
|     target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015 |     target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015 | ||||||
|     experimentalDecorators: true, |     experimentalDecorators: true, | ||||||
|     esModuleInterop: true, |     esModuleInterop: true, | ||||||
| @@ -13,19 +13,6 @@ const defaultTsNodeOptions: tsNode.CreateOptions = { | |||||||
|   skipIgnore: true, |   skipIgnore: true, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| if (process.argv.includes('--web')) { |  | ||||||
|   const previousCompilerOptions = defaultTsNodeOptions.compilerOptions as CompilerOptions; |  | ||||||
|   defaultTsNodeOptions.compilerOptions = { |  | ||||||
|     ...previousCompilerOptions, |  | ||||||
|     lib: ['es2016', 'es2017', 'dom'], |  | ||||||
|     target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015 |  | ||||||
|   }; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| if (process.argv.includes('--nocache')) { |  | ||||||
|   // currently caching is not used |  | ||||||
| } |  | ||||||
|  |  | ||||||
| tsNode.register(defaultTsNodeOptions); | tsNode.register(defaultTsNodeOptions); | ||||||
|  |  | ||||||
| export const runCli = async () => { | export const runCli = async () => { | ||||||
| @@ -35,6 +22,7 @@ export const runCli = async () => { | |||||||
|   const pathToTsFile = process.argv[2]; |   const pathToTsFile = process.argv[2]; | ||||||
|  |  | ||||||
|   const pathToLoad = path.join(process.cwd(), pathToTsFile); |   const pathToLoad = path.join(process.cwd(), pathToTsFile); | ||||||
|   process.argv.pop(); |   process.argv.splice(2, 1); | ||||||
|  |   console.log(process.argv); | ||||||
|   import(pathToLoad); |   import(pathToLoad); | ||||||
| }; | }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user