-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcmw
More file actions
41 lines (33 loc) · 1.21 KB
/
cmw
File metadata and controls
41 lines (33 loc) · 1.21 KB
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
33
34
35
36
37
38
39
40
41
<?php
use CMW\Cli\Builder\AI\Copilot\AICopilotContextBuilder;
use CMW\Cli\Builder\Package\PackageBuilder;
use CMW\Cli\Builder\Theme\ThemeBuilder;
use CMW\Cli\CliBuilder;
use CMW\Manager\Env\EnvManager;
// Set the environment to standalone
$GLOBALS['CMW_ENV'] = 'standalone';
// Get the command choice
$command = $argv[1] ?? null;
// Include the EnvManager
include_once('App/Manager/Env/EnvManager.php');
// If we don't have selected any option...
if ($command === null) {
require_once(EnvManager::getInstance()->getValue('DIR') . 'App/Cli/CliBuilder.php');
$builder = new CliBuilder();
$builder->emptyArgs();
}
// Theme Builder
if ($command === 'theme-init') {
require_once(EnvManager::getInstance()->getValue('DIR') . 'App/Cli/Builder/Theme/ThemeBuilder.php');
new ThemeBuilder();
}
// Package Builder
if ($command === 'package-init') {
require_once(EnvManager::getInstance()->getValue('DIR') . 'App/Cli/Builder/Package/PackageBuilder.php');
new PackageBuilder();
}
// Create / Update github copilot context
if ($command === 'ai-copilot') {
require_once(EnvManager::getInstance()->getValue('DIR') . 'App/Cli/Builder/AI/Copilot/AICopilotContextBuilder.php');
new AICopilotContextBuilder();
}