update tsrun

This commit is contained in:
Philipp Kunz 2018-06-30 19:20:36 +02:00
parent 39d94a3daa
commit 51cc29d79b
6 changed files with 8 additions and 9 deletions

3
cli.js Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env node
process.env.CLI_CALL_TSRUN = 'true'
var index = require("./dist/index.js");

3
dist/cli.js vendored
View File

@ -1,3 +0,0 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true'
var index = require("../dist/index.js");

4
dist/index.js vendored
View File

@ -6,7 +6,7 @@ tsNode.register({
compilerOptions: {
lib: ['es2016', 'es2017']
},
ignore: []
ignore: ['^(.(.*\.d\.ts))*$']
});
if (process.env.CLI_CALL_TSRUN) {
// contents of argv array
@ -16,4 +16,4 @@ if (process.env.CLI_CALL_TSRUN) {
const pathToLoad = path.join(process.cwd(), pathToTsFile);
Promise.resolve().then(() => require(pathToLoad));
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGtDQUFrQztBQUNsQyw2QkFBNkI7QUFFN0IsTUFBTSxDQUFDLFFBQVEsQ0FBQztJQUNkLGVBQWUsRUFBRTtRQUNmLEdBQUcsRUFBRSxDQUFFLFFBQVEsRUFBRSxRQUFRLENBQUU7S0FDNUI7SUFDRCxNQUFNLEVBQUUsRUFBRTtDQUNYLENBQUMsQ0FBQztBQUVILElBQUksT0FBTyxDQUFDLEdBQUcsQ0FBQyxjQUFjLEVBQUU7SUFDOUIseUJBQXlCO0lBQ3pCLHFDQUFxQztJQUNyQyxzQ0FBc0M7SUFDdEMsTUFBTSxZQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUVwQyxNQUFNLFVBQVUsR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsRUFBRSxZQUFZLENBQUMsQ0FBQztJQUMxRCxxQ0FBTyxVQUFVLEdBQUU7Q0FDcEIifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGtDQUFrQztBQUNsQyw2QkFBNkI7QUFFN0IsTUFBTSxDQUFDLFFBQVEsQ0FBQztJQUNkLGVBQWUsRUFBRTtRQUNmLEdBQUcsRUFBRSxDQUFFLFFBQVEsRUFBRSxRQUFRLENBQUU7S0FDNUI7SUFDRCxNQUFNLEVBQUUsQ0FBQyxtQkFBbUIsQ0FBQztDQUM5QixDQUFDLENBQUM7QUFFSCxJQUFJLE9BQU8sQ0FBQyxHQUFHLENBQUMsY0FBYyxFQUFFO0lBQzlCLHlCQUF5QjtJQUN6QixxQ0FBcUM7SUFDckMsc0NBQXNDO0lBQ3RDLE1BQU0sWUFBWSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUE7SUFFcEMsTUFBTSxVQUFVLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLEVBQUUsWUFBWSxDQUFDLENBQUM7SUFDMUQscUNBQU8sVUFBVSxHQUFFO0NBQ3BCIn0=

View File

@ -1,6 +1,5 @@
{
"npmts": {
"cli": true
},
"npmci": {
"npmGlobalTools": [

View File

@ -7,10 +7,10 @@
"author": "Lossless GmbH",
"license": "MIT",
"bin": {
"tsrun": "dist/cli.js"
"tsrun": "./cli.js"
},
"scripts": {
"test": "(npmts --notest && node dist/cli.js test/test.ts)",
"test": "(npmts --notest && node ./cli.js test/test.ts)",
"format": "(gitzone format)",
"build": "echo \"Not needed for now\""
},

View File

@ -5,7 +5,7 @@ tsNode.register({
compilerOptions: {
lib: [ 'es2016', 'es2017' ]
},
ignore: []
ignore: ['^(.(.*\.d\.ts))*$']
});
if (process.env.CLI_CALL_TSRUN) {