Skip to content

Commit

Permalink
- Reldens - v4.0.0 - Improve package.json update with missing require…
Browse files Browse the repository at this point in the history
…d data only and included logs.
  • Loading branch information
damian-pastorini committed May 22, 2024
1 parent 36e9fcb commit 95ca350
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/game/server/theme-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,19 @@ class ThemeManager
if(!data.alias){
data.alias = {};
}
if(data.alias.process){
Logger.critical('Data alias process already exists, it must be set to "false" for the bundler.', data);
data.alias.processBackup = data.alias.process;
}
data.alias.process = false;
data.main = 'index.js';
data.browserslist = ['> 0.5%, last 2 versions, not dead'];
data.targets = {main: false};
if(!data.targets){
data.targets = {};
}
if(data.targets.main){
Logger.critical('Data targets main already exists, it must be set to "false" for the bundler.', data);
data.targets.mainBackup = data.targets.main;
}
data.targets.main = false;
await FileHandler.updateFileContents(jsonFile, JSON.stringify(data, null, 2));
Logger.info('File package.json updated successfully.', jsonFile);
}
Expand Down

0 comments on commit 95ca350

Please sign in to comment.