From 0e2dbe85e867b071df782d0a5131ae1cb8398846 Mon Sep 17 00:00:00 2001 From: Rougin Gutib Date: Fri, 29 Nov 2024 09:08:23 +0800 Subject: [PATCH] Change names in plates --- setup.php | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/setup.php b/setup.php index 65a6307..21a4e8b 100644 --- a/setup.php +++ b/setup.php @@ -290,6 +290,7 @@ function run($command) $app = __DIR__ . '/app'; $src = __DIR__ . '/src'; +$space = str_repeat(' ', 8); // Replace namespace in "index.php" -------- $index = $app . '/public/index.php'; @@ -298,6 +299,17 @@ function run($command) replace_in_file($index, $texts); // ----------------------------------------- +// Replace names in "blades" and "plates" folder ------------ +$texts = array('Basilisk' => $name); +$text = 'A skeleton application for the Slytherin framework'; +$texts[$text] = $desc; +$texts['Muggle'] = $author; + +replace_in_file($app . '/plates/index.php', $texts); + +replace_in_file($app . '/blades/index.blade.php', $texts); +// ---------------------------------------------------------- + if (! $useAssets) { remove_dir($app . '/assets'); @@ -324,8 +336,6 @@ function run($command) $render = "'Rougin\Slytherin\Template\RendererIntegration'"; - $space = str_repeat(' ', 8); - $texts = array(); $texts[$space . $render] = $space . '// ' . $render; @@ -336,6 +346,15 @@ function run($command) remove_dir($app . '/plates'); run('composer require illuminate/view'); + + // Always use "cache" folder --- + $useCache = true; + // ----------------------------- +} + +if (! $useCache) +{ + remove_dir($app . '/cache'); } if ($useEloquent) @@ -347,8 +366,6 @@ function run($command) { $text = "'Rougin\Weasley\Packages\Laravel\Eloquent'"; - $space = str_repeat(' ', 8); - $texts = array($space . $text => $space . '// ' . $text); replace_in_file($config . '/app.php', $texts);