Skip to content

Commit

Permalink
Added extra condition get frontend files if its in distroProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
nravilla committed Sep 26, 2024
1 parent cbe1b98 commit f9707ca
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,14 @@ public void installFromDistroProperties(File appDataDir, DistroProperties distro
// print frontend tool version number
nodeHelper.runNpx(String.format("%s --version", program), legacyPeerDeps);

List<File> configFiles = ContentHelper.collectFrontendConfigs(distroProperties);

if (configFiles.isEmpty()) {
nodeHelper.runNpx(
String.format("%s assemble --target %s --mode config --config %s", program, buildTargetDir, spaConfigFile), legacyPeerDeps);
} else {
String assembleCommand = assembleWithFrontendConfig(program, buildTargetDir, configFiles, spaConfigFile);
nodeHelper.runNpx(assembleCommand, legacyPeerDeps);
if (distroProperties.getContentArtifacts().isEmpty()) {
nodeHelper.runNpx(String.format("%s assemble --target %s --mode config --config %s", program, buildTargetDir,
spaConfigFile), legacyPeerDeps);
} else {
List<File> configFiles = ContentHelper.collectFrontendConfigs(distroProperties);
String assembleCommand = assembleWithFrontendConfig(program, buildTargetDir, configFiles, spaConfigFile);
nodeHelper.runNpx(assembleCommand, legacyPeerDeps);
}

nodeHelper.runNpx(
String.format("%s build --target %s --build-config %s", program, buildTargetDir, spaConfigFile), legacyPeerDeps);

Expand Down

0 comments on commit f9707ca

Please sign in to comment.