UNPKG

@modyo/cli

Version:

Modyo CLI Command line to expose local development tools

15 lines (14 loc) 687 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const update_widget_1 = tslib_1.__importDefault(require("./update-widget")); const publish_widget_1 = tslib_1.__importDefault(require("./publish-widget")); const get_wiget_id_1 = tslib_1.__importDefault(require("./get-wiget-id")); async function uploadWidget(name, resources, config, options) { const widgetId = await (0, get_wiget_id_1.default)(name, config); await (0, update_widget_1.default)(name, widgetId, resources, config); if (options.publish) { await (0, publish_widget_1.default)(name, widgetId, config); } } exports.default = uploadWidget;