Removed mock up data from PROD. Will make optional file: tts_arrays.php which will only be included if needed.

main
Robert 3 years ago
parent e71badd548
commit fb5de3ce0e
  1. 24
      src/compiler.php

@ -7,8 +7,18 @@ declare(strict_types=1);
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
$print_new_line = false;
$show_filename_comments = false;
$debugging_AKA_non_production_mode = false;
if ($debugging_AKA_non_production_mode) {
$print_new_line = true;
$show_filename_comments = true;
$skip_mocking_data_arrays = false;
} else {
$print_new_line = false;
$show_filename_comments = false;
$skip_mocking_data_arrays = true;
}
$make_one_file = true;
if ($make_one_file) {
@ -82,8 +92,10 @@ function rsearch(array & $file_list, string $folder, string $pattern): void {
foreach($files as $file) {
// If we are making Multiple files, skip now and later make new file for arrays
if (
$GLOBALS['make_one_file'] === false &&
if ((
$GLOBALS['skip_mocking_data_arrays'] ||
$GLOBALS['make_one_file'] === false
) &&
str_contains($file[0], "/arrays/")
) {
$arrays[] = $file[0];
@ -91,8 +103,8 @@ function rsearch(array & $file_list, string $folder, string $pattern): void {
}
$file_list[] = $file[0];
}
if ($GLOBALS['make_one_file'] === false) {
compile($arrays, "tts_arrays.php", "namespace tts;");
if ($GLOBALS['skip_mocking_data_arrays'] || $GLOBALS['make_one_file'] === false) {
compile($arrays, "tts_arrays.php", false, "namespace tts;");
}
}

Loading…
Cancel
Save