From 0b04c22b58cf09565a3aabe935a2c555b9c33e43 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 10 Feb 2017 15:50:07 -0500 Subject: [PATCH] Split user config from application config --- app/{config => appConf}/base_config.php | 0 app/{config => appConf}/menus.php | 0 app/{config => appConf}/minify_config.php | 0 app/{config => appConf}/minify_css_groups.php | 0 app/{config => appConf}/minify_js_groups.php | 0 app/{config => appConf}/routes.php | 0 index.php | 3 ++- public/css.php | 2 +- public/js.php | 2 +- 9 files changed, 4 insertions(+), 3 deletions(-) rename app/{config => appConf}/base_config.php (100%) rename app/{config => appConf}/menus.php (100%) rename app/{config => appConf}/minify_config.php (100%) rename app/{config => appConf}/minify_css_groups.php (100%) rename app/{config => appConf}/minify_js_groups.php (100%) rename app/{config => appConf}/routes.php (100%) diff --git a/app/config/base_config.php b/app/appConf/base_config.php similarity index 100% rename from app/config/base_config.php rename to app/appConf/base_config.php diff --git a/app/config/menus.php b/app/appConf/menus.php similarity index 100% rename from app/config/menus.php rename to app/appConf/menus.php diff --git a/app/config/minify_config.php b/app/appConf/minify_config.php similarity index 100% rename from app/config/minify_config.php rename to app/appConf/minify_config.php diff --git a/app/config/minify_css_groups.php b/app/appConf/minify_css_groups.php similarity index 100% rename from app/config/minify_css_groups.php rename to app/appConf/minify_css_groups.php diff --git a/app/config/minify_js_groups.php b/app/appConf/minify_js_groups.php similarity index 100% rename from app/config/minify_js_groups.php rename to app/appConf/minify_js_groups.php diff --git a/app/config/routes.php b/app/appConf/routes.php similarity index 100% rename from app/config/routes.php rename to app/appConf/routes.php diff --git a/index.php b/index.php index 0d8a5615..14eda8dc 100644 --- a/index.php +++ b/index.php @@ -41,6 +41,7 @@ function _dir() // Define base directories $APP_DIR = _dir(__DIR__, 'app'); +$APPCONF_DIR = _dir($APP_DIR, 'appConf'); $CONF_DIR = _dir($APP_DIR, 'config'); // Load composer autoloader @@ -61,7 +62,7 @@ $whoops->register(); // ----------------------------------------------------------------------------- // Dependency Injection setup // ----------------------------------------------------------------------------- -require _dir($CONF_DIR, 'base_config.php'); // $base_config +require _dir($APPCONF_DIR, 'base_config.php'); // $base_config $di = require _dir($APP_DIR, 'bootstrap.php'); $config = loadToml($CONF_DIR); diff --git a/public/css.php b/public/css.php index 0f2f5a42..3253765b 100644 --- a/public/css.php +++ b/public/css.php @@ -160,7 +160,7 @@ class CSSMin extends BaseMin { // -------------------------------------------------------------------------- //Get config files -$config = require('../app/config/minify_config.php'); +$config = require('../app/appConf/minify_config.php'); $groups = require($config['css_groups_file']); if ( ! array_key_exists($_GET['g'], $groups)) diff --git a/public/js.php b/public/js.php index 83233975..e8f50232 100644 --- a/public/js.php +++ b/public/js.php @@ -233,7 +233,7 @@ class JSMin extends BaseMin { // ! Start Minifying // -------------------------------------------------------------------------- -$config = require_once('../app/config/minify_config.php'); +$config = require_once('../app/appConf/minify_config.php'); $groups = require_once($config['js_groups_file']); $cache_dir = "{$config['js_root']}cache";