UNPKG

recastify

Version:

Web Component transfiguration tool. Convert Web Components in a multitude of formats to other formats.

22 lines (21 loc) 694 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.convertComponent = void 0; const chalk = require("chalk"); const node_child_process_1 = require("node:child_process"); /** * Convert a component from one framework to another. * * @param {string} prompts - prompts: Object of the values from the prompt questions; * @returns NULL */ const convertComponent = (prompts) => { console.log(prompts); try { (0, node_child_process_1.execSync)(`echo "Converting ${prompts.src} to ${prompts.name}..."`); } catch (error) { throw console.error(`${chalk.red("error")}: ${error}`); } }; exports.convertComponent = convertComponent;