ngrx-uml
Version:
NGRX to Plant UML diagram
36 lines (35 loc) • 1.38 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const loglevel_1 = __importDefault(require("loglevel"));
const printAstInProgram_1 = require("../../../lib/diagnostic/printAstInProgram");
exports.command = 'ast-variables';
exports.desc = 'Create typescript program using tsconfig and print AST variables for one file';
exports.aliases = ['astv'];
exports.builder = (yargs) => {
return yargs
.option('files', {
alias: 'f',
description: 'Glob-like file pattern specifying the filepath for the source files. Only first file will be use.',
type: 'string',
nargs: 1,
default: 'src/**/*.ts'
}).option('baseDir', {
alias: 'd',
description: 'Path to project base directory',
type: 'string',
default: './'
}).option('tsConfig', {
alias: 'c',
description: 'tsconfig file name with relative path from baseDir',
type: 'string',
default: 'tsconfig.json'
});
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exports.handler = function (argv) {
loglevel_1.default.debug('ast-program');
printAstInProgram_1.printAstVariablesInProgram(argv.files, argv.baseDir, argv.tsConfig);
};