Skip to content

Commit 0e2dbe8

Browse files
committed
Change names in plates
1 parent 525b93e commit 0e2dbe8

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

setup.php

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ function run($command)
290290

291291
$app = __DIR__ . '/app';
292292
$src = __DIR__ . '/src';
293+
$space = str_repeat(' ', 8);
293294

294295
// Replace namespace in "index.php" --------
295296
$index = $app . '/public/index.php';
@@ -298,6 +299,17 @@ function run($command)
298299
replace_in_file($index, $texts);
299300
// -----------------------------------------
300301

302+
// Replace names in "blades" and "plates" folder ------------
303+
$texts = array('Basilisk' => $name);
304+
$text = 'A skeleton application for the Slytherin framework';
305+
$texts[$text] = $desc;
306+
$texts['Muggle'] = $author;
307+
308+
replace_in_file($app . '/plates/index.php', $texts);
309+
310+
replace_in_file($app . '/blades/index.blade.php', $texts);
311+
// ----------------------------------------------------------
312+
301313
if (! $useAssets)
302314
{
303315
remove_dir($app . '/assets');
@@ -324,8 +336,6 @@ function run($command)
324336

325337
$render = "'Rougin\Slytherin\Template\RendererIntegration'";
326338

327-
$space = str_repeat(' ', 8);
328-
329339
$texts = array();
330340

331341
$texts[$space . $render] = $space . '// ' . $render;
@@ -336,6 +346,15 @@ function run($command)
336346
remove_dir($app . '/plates');
337347

338348
run('composer require illuminate/view');
349+
350+
// Always use "cache" folder ---
351+
$useCache = true;
352+
// -----------------------------
353+
}
354+
355+
if (! $useCache)
356+
{
357+
remove_dir($app . '/cache');
339358
}
340359

341360
if ($useEloquent)
@@ -347,8 +366,6 @@ function run($command)
347366
{
348367
$text = "'Rougin\Weasley\Packages\Laravel\Eloquent'";
349368

350-
$space = str_repeat(' ', 8);
351-
352369
$texts = array($space . $text => $space . '// ' . $text);
353370

354371
replace_in_file($config . '/app.php', $texts);

0 commit comments

Comments
 (0)