Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
03625bfca4 | |||
cc92e3e9ca | |||
c1e66d498a | |||
bfbb802e88 | |||
655fd8b92e | |||
a240cdfde1 | |||
2af7682cf0 | |||
c62619bd27 | |||
ffaf54f1de | |||
2c6b955819 | |||
9bb13e1ede | |||
d9bd5e5340 | |||
b76de3e04d | |||
808726d1df | |||
d011f10b9b | |||
d1baa20aad |
742
package-lock.json
generated
742
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/tsrun",
|
||||
"version": "1.2.27",
|
||||
"version": "1.2.35",
|
||||
"description": "run typescript programs efficiently",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
@ -16,18 +16,16 @@
|
||||
"build": "(tsbuild)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.43",
|
||||
"@gitzone/tsbuild": "^2.1.63",
|
||||
"@pushrocks/smartcli": "^3.0.14",
|
||||
"@types/node": "^17.0.21",
|
||||
"node-fetch": "^3.2.2",
|
||||
"tslint": "^6.1.2",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
"@types/node": "^17.0.38",
|
||||
"node-fetch": "^3.2.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartfile": "^9.0.6",
|
||||
"@pushrocks/smartshell": "^2.0.30",
|
||||
"ts-node": "^10.7.0",
|
||||
"typescript": "4.7.0-dev.20220311"
|
||||
"ts-node": "^10.8.0",
|
||||
"typescript": "^4.7.2"
|
||||
},
|
||||
"private": false,
|
||||
"files": [
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@gitzone/tsrun',
|
||||
version: '1.2.35',
|
||||
description: 'run typescript programs efficiently'
|
||||
}
|
16
ts/index.ts
16
ts/index.ts
@ -1,11 +1,10 @@
|
||||
import * as plugins from './plugins.js';
|
||||
const __dirname = plugins.path.dirname(plugins.url.fileURLToPath(import.meta.url));
|
||||
|
||||
import { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export const runPath = async (pathArg: string) => {
|
||||
export const runPath = async (pathArg: string, fromFileUrl?: string) => {
|
||||
pathArg = fromFileUrl
|
||||
? plugins.path.join(plugins.path.dirname(plugins.url.fileURLToPath(fromFileUrl)), pathArg)
|
||||
: pathArg;
|
||||
await runCli(pathArg);
|
||||
};
|
||||
|
||||
@ -18,7 +17,10 @@ export const runCli = async (pathArg?: string) => {
|
||||
? relativePathToTsFile
|
||||
: plugins.path.join(process.cwd(), relativePathToTsFile);
|
||||
|
||||
process.argv.splice(0, 3); // this ensures transparent arguments for the child process
|
||||
// we want to have command line arguments available in the child process.
|
||||
// when we have a path sepcified through a function there is one argeument less to pay respect to.
|
||||
// thus when pathArg is specifed -> we only splice 2
|
||||
pathArg ? process.argv.splice(0, 2) : process.argv.splice(0, 3); // this ensures transparent arguments for the child process
|
||||
|
||||
// lets setup things for execution
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
|
@ -4,11 +4,12 @@ import type { CompilerOptions } from 'typescript';
|
||||
const defaultTsNodeOptions: plugins.tsNode.CreateOptions = {
|
||||
compilerOptions: {
|
||||
lib: ['dom'],
|
||||
target: <any>'es2020', // Script Target should be a string -> 2 is for ES2015
|
||||
target: <any>'es2022', // Script Target should be a string -> 2 is for ES2015
|
||||
experimentalDecorators: true,
|
||||
useDefineForClassFields: false,
|
||||
esModuleInterop: true,
|
||||
strictNullChecks: false,
|
||||
moduleResolution: <any>'node12',
|
||||
moduleResolution: <any>'nodenext',
|
||||
module: <any>'ESNext',
|
||||
importsNotUsedAsValues: <any>'preserve',
|
||||
} as CompilerOptions,
|
||||
|
@ -1,8 +1,10 @@
|
||||
// node native
|
||||
import * as path from 'path';
|
||||
import * as url from 'url';
|
||||
|
||||
export {
|
||||
path
|
||||
path,
|
||||
url
|
||||
}
|
||||
|
||||
// @pushrocks scope
|
||||
|
Reference in New Issue
Block a user