gluestack-ui
Version:
A CLI tool for easily adding components from gluestack to your projects.
27 lines (26 loc) • 920 B
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@clack/prompts"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleError = handleError;
const prompts_1 = require("@clack/prompts");
function handleError(error) {
if (typeof error === 'string') {
prompts_1.log.error(error);
process.exit(1);
}
if (error instanceof Error) {
prompts_1.log.error(error.message);
process.exit(1);
}
prompts_1.log.error('Something went wrong. Please try again.');
process.exit(1);
}
});