@lidhium/cli
Version:
micro-frontend cli packed with webpack
25 lines (24 loc) • 972 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exposeActions;
const chalk_1 = __importDefault(require("chalk"));
const common_1 = require("../utils/common");
const common_2 = require("../utils/common");
function exposeActions() {
return (componentPath) => {
var _a;
const appName = (0, common_1.getAppName)();
const componentName = (_a = componentPath
.split("/")
.pop()) === null || _a === void 0 ? void 0 : _a.split(".vue")[0];
(0, common_2.updateExposedComponents)({
appName,
componentName,
componentPath,
});
console.log(chalk_1.default.green(`Component ${chalk_1.default.magenta(componentName)} exposed successfully in ${chalk_1.default.magenta(appName)}`));
};
}