UNPKG

940 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const tslib_1 = require("tslib");
4const command_1 = require("../cli/command");
5const generate_1 = require("./generate");
6exports.validateCmd = {
7 command: "validate [components..]",
8 describe: "Validate components",
9 builder(argv) {
10 /* istanbul ignore next */
11 return generate_1.generateBuilder(argv)
12 .example("$0 validate", "Validate components")
13 .example("$0 validate foo bar", "Specify components")
14 .example("$0 validate foo_*", "Use glob syntax");
15 },
16 handler(args) {
17 return tslib_1.__awaiter(this, void 0, void 0, function* () {
18 const logger = command_1.getLogger(args);
19 yield generate_1.generateHandler(Object.assign({}, args, { validate: true }));
20 logger.success("Components are valid");
21 });
22 }
23};
24//# sourceMappingURL=validate.js.map
\No newline at end of file