diff --git a/bin/universal-box.js b/bin/universal-box.js new file mode 100644 index 0000000..8696485 --- /dev/null +++ b/bin/universal-box.js @@ -0,0 +1,38 @@ +#!/usr/bin/env node +import { exec } from 'child_process'; +import chalk from 'chalk'; +import { spawn } from 'child_process'; + +const [,, command] = process.argv; + +console.log(`Command received: ${command}`); // Debugging statement + + +switch (command) { + case 'init': + console.log('Initializing...'); // Debugging statement + const child = spawn('node', ['index.js'], { stdio: 'inherit' }); + + child.on('error', (error) => { + console.error(`Error: ${error.message}`); + }); + + child.on('exit', (code) => { + console.log(`Process exited with code ${code}`); + }); + break; + + case '--help': + console.log(chalk.blue('For more information, visit the documentation at: https://universal-box.co/')); + console.log(chalk.green('Available commands:')); + console.log(chalk.green(' - universal-box init')); + console.log(chalk.green(' - universal-box deploy')); + break; + + case 'deploy': + console.log(chalk.yellow('Deployment utility function is still under development in an UAT environment and will be published soon.')); + break; + + default: + console.log(chalk.red('Unknown command. Use "universal-box --help" for available commands.')); +} diff --git a/package.json b/package.json index 13ae4ab..5290365 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ }, "main": "index.js", "type": "module", + "bin": { + "universal-box": "./bin/universal-box.js" + }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/templates/FullStack/React(Frontend) + Flask(Backend)/README.md b/templates/FullStack/React(Frontend) + Flask(Backend)/README.md new file mode 100644 index 0000000..e69de29 diff --git a/templates/FullStack/React(Frontend) + Flask(Backend)/index.ts b/templates/FullStack/React(Frontend) + Flask(Backend)/index.ts new file mode 100644 index 0000000..e69de29