fix(core): update

This commit is contained in:
Philipp Kunz 2021-06-23 15:57:57 +02:00
parent 14a043be1e
commit 0caaac2a67

View File

@ -4,7 +4,7 @@ import { CompilerOptions } from 'typescript';
const defaultTsNodeOptions: tsNode.CreateOptions = {
compilerOptions: {
lib: ['es2017'],
lib: ['es2016', 'es2017', 'dom'],
target: <any>'es2017', // Script Target should be a string -> 2 is for ES2015
experimentalDecorators: true,
esModuleInterop: true,
@ -13,19 +13,6 @@ const defaultTsNodeOptions: tsNode.CreateOptions = {
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);
export const runCli = async () => {
@ -35,6 +22,7 @@ export const runCli = async () => {
const pathToTsFile = process.argv[2];
const pathToLoad = path.join(process.cwd(), pathToTsFile);
process.argv.pop();
process.argv.splice(2, 1);
console.log(process.argv);
import(pathToLoad);
};