create-dolittle-microservice
Version:
In Norse mythology, the Vanir are a group of gods associated with health, fertility, wisdom, and the ability to see the future.
30 lines • 1.31 kB
JavaScript
;
/* eslint-disable header/header */
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
const path_1 = __importDefault(require("path"));
const fs_1 = __importDefault(require("fs"));
const commander_1 = __importDefault(require("commander"));
const chalk_1 = __importDefault(require("chalk"));
const packageRoot_1 = __importDefault(require("./packageRoot"));
const creation_1 = require("./creation");
const packageJsonFile = path_1.default.join(packageRoot_1.default, 'package.json');
let packageJson = { name: 'unknown', version: '1.0.0' };
if (fs_1.default.existsSync(packageJsonFile)) {
packageJson = require(packageJsonFile);
}
const program = new commander_1.default.Command(packageJson.name)
.version(packageJson.version)
.arguments('<microservice-name>')
.usage(`${chalk_1.default.green('<microservice-name>')} [options]`)
.action(name => {
creation_1.launchWizard();
})
.addHelpCommand()
.parse(process.argv);
//# sourceMappingURL=index.js.map