UNPKG

create-testplane

Version:

A tool for fast and simple Testplane configuration

36 lines 1.29 kB
#!/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 }); const load_esm_1 = require("load-esm"); const index_1 = __importDefault(require("../index")); const utils_1 = require("../utils"); async function main() { const [{ default: yargs }, { hideBin }] = await Promise.all([ (0, load_esm_1.loadEsm)("yargs"), (0, load_esm_1.loadEsm)("yargs/helpers"), ]); const argv = yargs(hideBin(process.argv)) .usage("Usage: $0 <path>") .option("lang", { alias: "l", type: "string", default: "ts", description: "Language, which will be used to write Testplane tests", choices: ["ts", "js"], }) .option("verbose", { alias: "v", type: "boolean", default: false, description: "Advanced configuration with extra questions", }) .parse(); const argvOpts = (0, utils_1.optsFromArgv)(argv); const createOpts = (defaultOpts) => (Object.assign(Object.assign({}, defaultOpts), argvOpts)); await index_1.default.run({ createOpts }); } main(); //# sourceMappingURL=create-testplane.js.map