gluestack-ui
Version:
A CLI tool for easily adding components from gluestack to your projects.
42 lines (37 loc) • 1.46 kB
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", "commander"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.help = void 0;
const prompts_1 = require("@clack/prompts");
const commander_1 = require("commander");
exports.help = new commander_1.Command()
.name('help')
.description('Display help for a command')
.action(() => {
try {
prompts_1.log.message(`
\x1b[36m- Init and add components\x1b[0m
\x1b[33mnpx gluestack-ui@latest\x1b[0m
\x1b[36m- Init gluestack-ui\x1b[0m
\x1b[33mnpx gluestack-ui@latest init\x1b[0m
\x1b[36m- Add component\x1b[0m
\x1b[33mnpx gluestack-ui@latest add <component-name>\x1b[0m
\x1b[36m- Add all component\x1b[0m
\x1b[33mnpx gluestack-ui@latest add --all\x1b[0m
\x1b[36m- Help\x1b[0m
\x1b[33mnpx gluestack-ui@latest help\x1b[0m`);
}
catch (err) {
prompts_1.log.error(`\x1b[31mError: ${err.message}\x1b[0m`);
process.exit(1);
}
});
});