UNPKG

672 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function customCommand(command, kernel, args) {
4 if (typeof command === 'string') {
5 const options = {};
6 const excludeKeys = ['_', 'version', 'v', 'help', 'h'];
7 Object.keys(args).forEach(key => {
8 if (!excludeKeys.includes(key)) {
9 options[key] = args[key];
10 }
11 });
12 kernel.run({
13 name: command,
14 opts: {
15 _: args._,
16 options,
17 isHelp: args.h
18 }
19 });
20 }
21}
22exports.default = customCommand;
23//# sourceMappingURL=customCommand.js.map
\No newline at end of file