-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjuice
More file actions
executable file
·32 lines (27 loc) · 859 Bytes
/
juice
File metadata and controls
executable file
·32 lines (27 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env php
<?php
// juice - Luxid CLI Tool
// Check PHP version
if (version_compare(PHP_VERSION, '8.0.0') < 0) {
echo "❌ Luxid requires PHP 8.0.0 or higher. You have " . PHP_VERSION . PHP_EOL;
exit(1);
}
// Get project root (where the CLI is being executed from, not where engine is installed)
$projectRoot = getcwd();
// Add Composer autoloader
$autoloadFile = $projectRoot . '/vendor/autoload.php';
if (!file_exists($autoloadFile)) {
echo "❌ Composer autoloader not found. Run: composer install" . PHP_EOL;
exit(1);
}
require_once $autoloadFile;
// Run the CLI application
try {
$app = new \Luxid\Console\Application();
exit($app->run());
} catch (\Throwable $e) {
echo "❌ Error: " . $e->getMessage() . PHP_EOL;
echo "📋 Stack trace:" . PHP_EOL;
echo $e->getTraceAsString() . PHP_EOL;
exit(1);
}