lots
This commit is contained in:
@@ -8,7 +8,7 @@ use Illuminate\Console\Command;
|
||||
class CompileConfig extends Command
|
||||
{
|
||||
|
||||
protected $signature = 'lucent:compile:config {path}';
|
||||
protected $signature = 'lucent:config';
|
||||
|
||||
protected $description = 'Compiles Config';
|
||||
|
||||
@@ -21,18 +21,18 @@ class CompileConfig extends Command
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$configDir = base_path($this->argument('path'));
|
||||
$configDir = base_path(config('lucent.config_path'));
|
||||
|
||||
$configJson = file_get_contents($configDir . "lucent.json");
|
||||
$configJson = file_get_contents($configDir . "/lucent.json");
|
||||
$config = json_decode($configJson, true);
|
||||
$schemasDirIterator = new DirectoryIterator($configDir . "Schemas");
|
||||
$schemasDirIterator = new DirectoryIterator($configDir . "/Schemas");
|
||||
$schemas = [];
|
||||
foreach ($schemasDirIterator as $file) {
|
||||
if ($file->getExtension() !== "json") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$schemaJson = file_get_contents($configDir . "Schemas/" . $file->getFilename());
|
||||
$schemaJson = file_get_contents($configDir . "/Schemas/" . $file->getFilename());
|
||||
$schema = json_decode($schemaJson, true);
|
||||
if (empty($schema)) {
|
||||
$this->error("Invalid JSON " . $file->getFilename());
|
||||
|
||||
Reference in New Issue
Block a user