UNPKG

1.05 kBJavaScriptView Raw
1"use strict";
2const command_1 = require("@oclif/command");
3const Compiler_1 = require("./Compiler");
4class FabCompile extends command_1.Command {
5 async run() {
6 const { args, flags } = this.parse(FabCompile);
7 const { input, output } = flags;
8 await Compiler_1.default.compile(input, flags['build-dir'], output);
9 }
10}
11FabCompile.description = 'describe the command here';
12FabCompile.flags = {
13 // add --version flag to show CLI version
14 version: command_1.flags.version({ char: 'v' }),
15 help: command_1.flags.help({ char: 'h' }),
16 input: command_1.flags.string({
17 char: 'i',
18 description: 'Intermediate FAB directory',
19 default: '.fab/intermediate'
20 }),
21 'build-dir': command_1.flags.string({
22 char: 'b',
23 description: 'Working FAB directory',
24 default: '.fab/build'
25 }),
26 output: command_1.flags.string({
27 char: 'o',
28 description: 'Output FAB file',
29 default: 'fab.zip'
30 }),
31};
32FabCompile.args = [];
33module.exports = FabCompile;