-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from librarianphp/newconfig
Restructured configuration
- Loading branch information
Showing
11 changed files
with
75 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
function config_default(string $config_dir): array | ||
{ | ||
$config = []; | ||
|
||
foreach (glob($config_dir . '/*.php') as $config_file) { | ||
$config_data = include $config_file; | ||
if (is_array($config_data)) { | ||
$config = array_merge($config, $config_data); | ||
} | ||
} | ||
|
||
return $config; | ||
} | ||
|
||
function load_config(): array | ||
{ | ||
return array_merge(config_default(__DIR__ . '/../config'), include __DIR__ . '/../config.php'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
return [ | ||
/***************************************************************************** | ||
* Dev.to Settings | ||
* Set Up your dev.to username here or via ENV var. | ||
* This is required if you want to import your posts from the dev.to platform. | ||
******************************************************************************/ | ||
'devto_username' => getenv('DEVTO_USER'), | ||
'devto_datadir' => '_to', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
return [ | ||
/**************************************************************************** | ||
* Minicli Settings | ||
* You shouldn't need to change the next settings, | ||
* but you are free to do so at your own risk. | ||
*****************************************************************************/ | ||
'app_path' => __DIR__ . '/../app/Command', | ||
'theme' => 'unicorn', | ||
'templates_path' => __DIR__ . '/../app/Resources/themes/default', | ||
'data_path' => __DIR__ . '/../app/Resources/data', | ||
'cache_path' => __DIR__ . '/../var/cache', | ||
'stencil_dir' => __DIR__ . '/../app/Resources/stencil', | ||
'stencil_locations' => [ | ||
'post' => __DIR__ . '/../app/Resources/data/_p' | ||
] | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
return [ | ||
/***************************************************************************** | ||
* End-to-end tests require you to set here the app url for testing. | ||
* For Docker Compose setups, this should be where Nginx is running. | ||
******************************************************************************/ | ||
'app_testing_url' => 'http://localhost', # Regular LEMP/LAMP/PHP built-in server | ||
#'app_testing_url' => 'http://nginx', # Docker Compose w/ separate Nginx service | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters