UNPKG

@lightweightform/kotlin-cli

Version:

LF Kotlin CLI Plugin

38 lines 1.53 kB
"use strict"; /* * @license * Copyright Lightweightform. All Rights Reserved. * * Use of this source code is governed by an Apache2.0-style license that can be * found at https://www.apache.org/licenses/LICENSE-2.0 */ Object.defineProperty(exports, "__esModule", { value: true }); var commander_1 = require("commander"); var path_1 = require("path"); var generate_command_1 = require("./commands/generate.command"); commander_1.default .name('lf-kotlin') .version('1.0.0') .command('generate <schemaFilePath> <outputDir> <projectName>') .alias('g') .option('-g, --groupid [groupid]', 'Maven Group Id (default=pt.lightweightform.<<projectName>>)') .option('-a, --artifactid [artifactid]', 'Maven Artifact Id (default=<<projectName>>)') .option('--skipModules [skipModules]', 'Skip creation of maven project (default=false)') .action(function (schemaFilePath, outputDir, projectName, options) { var generateCommand = new generate_command_1.default({ outPath: outputDir, projectName: projectName, groupId: options.groupid || 'pt.lightweightform', artifactId: options.artifactid || projectName, }); var schemaJson = null; if (path_1.default.isAbsolute(schemaFilePath)) { schemaJson = require(schemaFilePath); } else { schemaJson = require(process.cwd() + "/" + schemaFilePath); } generateCommand.generate(schemaJson, options.skipModules); }); commander_1.default.parse(process.argv); //# sourceMappingURL=index.js.map