Comparing version 0.2.1 to 0.2.2
@@ -1,2 +0,1 @@ | ||
import { TsToIoConfig } from "./config"; | ||
export declare function getValidatorsFromString(source: string, config?: { | ||
@@ -7,2 +6,2 @@ fileNames: string[]; | ||
}): string; | ||
export declare function getValidatorsFromFileNames(config: TsToIoConfig): string; | ||
export declare function getValidatorsFromFileNames(): string; |
@@ -174,3 +174,7 @@ "use strict"; | ||
exports.getValidatorsFromString = getValidatorsFromString; | ||
function getValidatorsFromFileNames(config) { | ||
function getValidatorsFromFileNames() { | ||
var config = config_1.getCliConfig(); | ||
if (!config.fileNames.length) { | ||
return config_1.displayHelp(); | ||
} | ||
var program = ts.createProgram(config.fileNames, compilerOptions); | ||
@@ -188,14 +192,2 @@ var checker = program.getTypeChecker(); | ||
exports.getValidatorsFromFileNames = getValidatorsFromFileNames; | ||
function isEntryPoint() { | ||
return require.main === module; | ||
} | ||
if (isEntryPoint()) { | ||
var config = config_1.getCliConfig(); | ||
if (!config.fileNames.length) { | ||
config_1.displayHelp(); | ||
} | ||
else { | ||
console.log(getValidatorsFromFileNames(config)); | ||
} | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "ts-to-io", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Juuso Mikkonen", |
Sorry, the diff of this file is not supported yet
36760
432