mirror of
https://github.com/flextype/flextype.git
synced 2025-08-18 02:41:27 +02:00
feat(core): use FLEXTYPE_
prefix for all core constants
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Flextype;
|
||||
|
||||
use function Glowy\Filesystem\filesystem;
|
||||
|
||||
define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()));
|
||||
define('FLEXTYPE_ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()));
|
||||
|
||||
/**
|
||||
* Define the project name.
|
||||
@@ -16,15 +16,15 @@ define('FLEXTYPE_PROJECT_NAME', 'project');
|
||||
/**
|
||||
* Define the PATH (without trailing slash).
|
||||
*/
|
||||
define('FLEXTYPE_PATH_PROJECT', ROOT_DIR . '/' . FLEXTYPE_PROJECT_NAME);
|
||||
define('FLEXTYPE_PATH_TMP', ROOT_DIR . '/var/tmp');
|
||||
define('FLEXTYPE_PATH_PROJECT', FLEXTYPE_ROOT_DIR . '/' . FLEXTYPE_PROJECT_NAME);
|
||||
define('FLEXTYPE_PATH_TMP', FLEXTYPE_ROOT_DIR . '/var/tmp');
|
||||
|
||||
|
||||
! is_file($flextype_autoload = ROOT_DIR . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> for flextype');
|
||||
! is_file($flextype_autoload = FLEXTYPE_ROOT_DIR . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> for flextype');
|
||||
$flextype_loader = require_once $flextype_autoload;
|
||||
|
||||
filesystem()->directory(FLEXTYPE_PATH_TMP)->exists() and filesystem()->directory(FLEXTYPE_PATH_TMP)->delete();
|
||||
filesystem()->directory(ROOT_DIR . '/project/config/flextype/')->ensureExists(0755, true);
|
||||
filesystem()->file(ROOT_DIR . '/tests/fixtures/settings/settings.yaml')->copy(ROOT_DIR . '/project/config/flextype/settings.yaml');
|
||||
filesystem()->directory(FLEXTYPE_ROOT_DIR . '/project/config/flextype/')->ensureExists(0755, true);
|
||||
filesystem()->file(FLEXTYPE_ROOT_DIR . '/tests/fixtures/settings/settings.yaml')->copy(FLEXTYPE_ROOT_DIR . '/project/config/flextype/settings.yaml');
|
||||
|
||||
include ROOT_DIR . '/src/flextype/flextype.php';
|
||||
include FLEXTYPE_ROOT_DIR . '/src/flextype/flextype.php';
|
Reference in New Issue
Block a user