Skip to content

Commit

Permalink
fix copy-custom compatibility with v8
Browse files Browse the repository at this point in the history
  • Loading branch information
yurikuzn committed Oct 16, 2023
1 parent 4ee38da commit 3f773eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions copy-custom.js
Expand Up @@ -14,10 +14,10 @@ function copyCustom () {

fs.copySync(sourcePath, distPath);

let entityTypeList = [];
const entityTypeList = [];

if (fs.existsSync(distPath + '/Entities')) {
fs.readdirSync(distPath + '/Entities').forEach(file => {
if (fs.existsSync(sourcePath + '/Controllers')) {
fs.readdirSync(sourcePath + '/Controllers').forEach(file => {
entityTypeList.push(file.slice(0, file.length - 4));
});
}
Expand All @@ -29,8 +29,8 @@ function copyCustom () {
defs['module'] = moduleName;
fs.writeFileSync(scopeDefsFile, JSON.stringify(defs, null, ' '));

['Controllers', 'Entities', 'Repositories', 'SelectManagers', 'Services'].forEach(item => {
let file = distPath + '/' + item + '/' + eType + '.php';
['Controllers', 'Entities', 'Repositories', 'Services'].forEach(item => {
const file = distPath + '/' + item + '/' + eType + '.php';

if (!fs.existsSync(file)) {
return;
Expand Down

0 comments on commit 3f773eb

Please sign in to comment.