@lark-project/cli
Version:
飞书项目插件开发工具
31 lines (30 loc) • 1.24 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.addBuildCommand = void 0;
// ⚠️ 改命令名 / flag / alias 时,同步 grep `lpm` skills/ .claude/skills/ 修文档引用
const path_1 = __importDefault(require("path"));
const types_1 = require("../../types");
const run_script_1 = __importDefault(require("../../utils/run-script"));
function addBuildCommand(program) {
program
.command('build')
.description('Bundles the plugin project into files for production.')
.option('--zip', 'Compress the build files to a zip.')
.option('--source-type <source-type>', 'Config source: local or remote')
.action(options => {
const { zip = false, sourceType } = options;
(0, run_script_1.default)(path_1.default.join(__dirname, '../dispatcher'), [
'--command',
types_1.ECommandName.build,
'--payload',
JSON.stringify({
zip,
source_type: sourceType,
}),
]);
});
}
exports.addBuildCommand = addBuildCommand;