Skip to content

Commit

Permalink
Always install webpack plugins (#9718)
Browse files Browse the repository at this point in the history
Plugin installation can be skipped
by defining `"update": false,` in installed
package.json of plugin under node_modules
  • Loading branch information
caalador committed Feb 12, 2021
1 parent f442e76 commit 7c225a8
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,8 @@ private void generatePluginFiles(String pluginName) throws IOException {
String packageFile = FileUtils
.readFileToString(new File(pluginTargetFile, PACKAGE_JSON),
StandardCharsets.UTF_8);
final FrontendVersion packageVersion = new FrontendVersion(
Json.parse(packageFile).getString("version"));
FrontendVersion pluginVersion = new FrontendVersion(
packageJson.getString("version"));
if (packageVersion.isEqualTo(pluginVersion)) {
log().debug(
"Skipping install of {} for version {} already installed",
pluginName, pluginVersion.getFullVersion());
final JsonObject targetJson = Json.parse(packageFile);
if(targetJson.hasKey("update") && !targetJson.getBoolean("update")) {
return;
}
}
Expand Down

0 comments on commit 7c225a8

Please sign in to comment.