@ui5/ts-interface-generator
Version:
Generator for TypeScript type definitions for custom UI5 controls implemented in TypeScript
40 lines • 1.74 kB
JavaScript
#!/usr/bin/env node
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore as the "rootDir" in tsconfig.json is set to "src", this file is outside the source tree. But that's fine and we don't want to make "." the root because this would include more files and cause build result path problems (files going to "dist/src").
const package_json_1 = __importDefault(require("../package.json"));
const generateTSInterfacesAPI_1 = require("./generateTSInterfacesAPI");
const yargs_1 = __importDefault(require("yargs"));
// configure yargs with the cli options as launcher
const version = `${package_json_1.default.version} (from ${__filename})`;
yargs_1.default.version(version);
yargs_1.default
.option({
config: {
alias: "c",
type: "string",
description: "Path to the configuration file to use",
},
watch: {
alias: "w",
type: "boolean",
description: "Run in watch mode",
},
loglevel: {
choices: ["error", "warn", "info", "debug", "trace"],
description: "Set the console logging verbosity",
},
jsdoc: {
choices: ["none", "minimal", "verbose"],
default: "verbose",
description: "Determines the amount of JSDoc that is generated for the methods; 'minimal' only adds JSDoc present in the source class, 'verbose' also the standard boilerplate texts.",
},
})
.default("watch", false)
.default("loglevel", "info");
const appArgs = yargs_1.default.argv;
(0, generateTSInterfacesAPI_1.main)(appArgs);
//# sourceMappingURL=generateTSInterfaces.js.map