UNPKG

@unimatrix-01/create-borg-ui

Version:

Borg UI - A modern React component library

59 lines (58 loc) 1.64 kB
#!/usr/bin/env node import { createApp } from './create-app.js'; import inquirer from 'inquirer'; async function main() { const args = process.argv.slice(2); const appName = args[0]; if (!appName) { console.error('Please provide an app name'); process.exit(1); } // Prompt for app type const { template } = await inquirer.prompt([ { type: 'list', name: 'template', message: 'What type of app would you like to create?', choices: [ { name: 'Vite + React + TypeScript', value: 'vite-react-ts' }, ], }, ]); // Prompt for app configuration const { appTitle, icon, footerContent } = await inquirer.prompt([ { type: 'input', name: 'appTitle', message: 'What is your app title?', default: appName, }, { type: 'input', name: 'icon', message: 'What icon would you like to use for your app? (default: icon)', default: 'icon', }, { type: 'input', name: 'footerContent', message: 'What content would you like in the footer?', default: '© 2024 Your Company. All rights reserved.', }, ]); try { await createApp({ appName, template, appTitle, icon, footerContent, noGit: args.includes('--no-git'), }); } catch (error) { console.error('Error creating app:', error); process.exit(1); } } main();