Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sondermanish committed Sep 4, 2024
1 parent 3c76115 commit fe25da5
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,16 @@ protected Set<String> updateEntitiesInRepo(ApplicationGitReference applicationGi

fileOperations.scanAndDeleteDirectoryForDeletedResources(validPages, baseRepo.resolve(PAGE_DIRECTORY));

// Save JS Libs if there's at least one change
// Earlier this condition included that modified resource not be null, and
// it should either have allModified flag turned as true or CUSTOM_JS_LIB_LIST resource map is not empty
// Save JS Libs if there's at least one change.

// What are the possible caveats of making this change?
// Since each resource in the entry needs to be present in the Modified resource map to be written
// There won't be any differences in writing files.
// In terms of performance, we would need to access the customJSLib directory every time to
// compare with the valid js libs.
if (modifiedResources != null) {
// && (modifiedResources.isAllModified()
// || !CollectionUtils.isEmpty(
// modifiedResources.getModifiedResourceMap().get(CUSTOM_JS_LIB_LIST)))) {

Path jsLibDirectory = baseRepo.resolve(JS_LIB_DIRECTORY);
Set<Map.Entry<String, Object>> jsLibEntries =
applicationGitReference.getJsLibraries().entrySet();
Expand Down

0 comments on commit fe25da5

Please sign in to comment.