Compare commits

...

6 Commits

Author SHA1 Message Date
dd33a359c3 1.2.16 2021-06-23 15:57:58 +02:00
0caaac2a67 fix(core): update 2021-06-23 15:57:57 +02:00
14a043be1e 1.2.15 2021-06-23 15:45:35 +02:00
de44be741d fix(core): update 2021-06-23 15:45:34 +02:00
d15500d5a0 1.2.14 2021-06-23 15:30:55 +02:00
7e99fd703f fix(core): update 2021-06-23 15:30:55 +02:00
3 changed files with 7 additions and 18 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@gitzone/tsrun", "name": "@gitzone/tsrun",
"version": "1.2.13", "version": "1.2.16",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@gitzone/tsrun", "name": "@gitzone/tsrun",
"version": "1.2.13", "version": "1.2.16",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@pushrocks/smartfile": "^8.0.10", "@pushrocks/smartfile": "^8.0.10",

View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tsrun", "name": "@gitzone/tsrun",
"version": "1.2.13", "version": "1.2.16",
"description": "run typescript programs efficiently", "description": "run typescript programs efficiently",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",

View File

@ -4,27 +4,15 @@ 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,
strictNullChecks: false,
} as CompilerOptions, } as CompilerOptions,
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 () => {
@ -34,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.shift(); process.argv.splice(2, 1);
console.log(process.argv);
import(pathToLoad); import(pathToLoad);
}; };