Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ async function runOpusifyWizard() {
console.log(chalk.blue(` Welcome to ${chalk.magenta('Opusify')} — The Full-Stack Scaffold Engine v1.0.0`));
console.log(chalk.gray(' Generate production-ready apps with one command.\n'));

const config = await inquirer.prompt([
let config;
try {
config = await inquirer.prompt([
// NEW STEP: Project Name
{
type: 'input',
Expand Down Expand Up @@ -132,6 +134,13 @@ async function runOpusifyWizard() {
default: true
}
]);
} catch (error) {
if (error.name === 'ExitPromptError' || error.message?.includes('User force closed')) {
console.log(chalk.yellow('\nScaffold cancelled. Goodbye!'));
process.exit(0);
}
throw error;
}

console.log('\n' + chalk.green('✔ Configuration collected successfully!'));

Expand Down
212 changes: 212 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"chalk": "^5.6.2",
"handlebars": "^4.7.9",
"inquirer": "^13.4.3",
"ora": "^9.4.0",
"tiged": "^2.12.7"
},
"devDependencies": {
Expand Down
Loading
Loading