@naturalcycles/cli
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -0,1 +1,8 @@ | ||
## [1.1.4](https://github.com/NaturalCycles/cli/compare/v1.1.3...v1.1.4) (2020-04-08) | ||
### Bug Fixes | ||
* remove logging (hide behind env.CLI_DEBUG) ([ff49938](https://github.com/NaturalCycles/cli/commit/ff4993811f7991413a07555f50534c37d795c3b4)) | ||
## [1.1.3](https://github.com/NaturalCycles/cli/compare/v1.1.2...v1.1.3) (2020-04-08) | ||
@@ -2,0 +9,0 @@ |
@@ -11,6 +11,8 @@ #!/usr/bin/env node | ||
const tsnode = require("ts-node"); | ||
exports.projectDir = path.join(__dirname, '../..'); | ||
exports.cfgDir = `${exports.projectDir}/cfg`; | ||
const projectDir = path.join(__dirname, '../..'); | ||
const cfgDir = `${projectDir}/cfg`; | ||
const { CLI_DEBUG } = process.env; | ||
main().catch(err => { | ||
console.error(err); | ||
console.log({ argv: process.argv }); | ||
process.exit(1); | ||
@@ -33,9 +35,13 @@ }); | ||
const cwd = process.cwd(); | ||
console.log({ | ||
argv1: process.argv, | ||
}); | ||
if (CLI_DEBUG) { | ||
console.log({ | ||
argv1: process.argv, | ||
}); | ||
} | ||
process.argv = [process.argv[0], ...process.argv.slice(2)]; | ||
console.log({ | ||
argv2: process.argv, | ||
}); | ||
if (CLI_DEBUG) { | ||
console.log({ | ||
argv2: process.argv, | ||
}); | ||
} | ||
require('loud-rejection/register'); | ||
@@ -82,3 +88,3 @@ require('dotenv/config'); | ||
await kpy({ | ||
baseDir: `${exports.cfgDir}/scripts/`, | ||
baseDir: `${cfgDir}/scripts/`, | ||
inputPatterns: ['tsconfig.json'], | ||
@@ -85,0 +91,0 @@ outputDir: './scripts', |
{ | ||
"name": "@naturalcycles/cli", | ||
"scripts": { | ||
"tsn-debug": "tsn ./src/bin/tsn.ts testscript.ts" | ||
"tsn-debug": "tsn ./src/bin/tsn.ts testscript.ts", | ||
"tsn-debug2": "ts-node -T ./src/bin/tsn.ts testscript.ts" | ||
}, | ||
@@ -40,3 +41,3 @@ "dependencies": { | ||
}, | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "CLI utils to be installed globally via 'npm i -g'", | ||
@@ -43,0 +44,0 @@ "author": "Natural Cycles Team", |
7509
106
7