Skip to content

Commit

Permalink
Update init.php
Browse files Browse the repository at this point in the history
  • Loading branch information
yurikuzn authored Sep 27, 2023
1 parent db3ac84 commit 959cf45
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,23 @@
$replacePlaceholders('README.md');
$replacePlaceholders('src/files/custom/Espo/Modules/MyModuleName/Resources/module.json');

if($es6) {
$content = <<<CLIENT_JSON
if ($es6) {
$content = <<<CLIENT_JSON
{
"scriptList": [
"__APPEND__",
"client/custom/modules/{@nameHyphen}/lib/init.js"
]
}
CLIENT_JSON;
$path = 'src/files/custom/Espo/Modules/MyModuleName/Resources/metadata/app/';
mkdir($path, 0755, True);
$path .= "client.json";
file_put_contents($path, $content);
$replacePlaceholders($path);

$path = 'src/files/custom/Espo/Modules/MyModuleName/Resources/metadata/app/';
mkdir($path, 0755, true);

$path .= "client.json";
file_put_contents($path, $content);

$replacePlaceholders($path);
}

rename('src/files/custom/Espo/Modules/MyModuleName', 'src/files/custom/Espo/Modules/'. $name);
Expand All @@ -74,4 +77,4 @@
rename('tests/unit/Espo/Modules/MyModuleName', 'tests/unit/Espo/Modules/'. $name);
rename('tests/integration/Espo/Modules/MyModuleName', 'tests/integration/Espo/Modules/'. $name);

echo "Ready. Now you need to run 'npm install'.\n";
echo "Ready. Now you need to run 'npm install'.\n";

0 comments on commit 959cf45

Please sign in to comment.