baset-cli
Version:
CLI for BaseT project.
28 lines • 1.09 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const find_up_1 = require("find-up");
const fs_1 = __importDefault(require("fs"));
const yargs = __importStar(require("yargs"));
const options_1 = require("./options");
const configPath = find_up_1.sync(['.basetrc', '.basetrc.json']);
const config = configPath ? JSON.parse(fs_1.default.readFileSync(configPath, { encoding: 'utf8' })) : {};
exports.cli = yargs
.usage('$0 <command>')
.commandDir('./commands')
.options(options_1.options)
.pkgConf('baset')
.config(config)
.help('h')
.alias('help', 'h')
.epilog('Made by Igmat.');
//# sourceMappingURL=index.js.map