Skip to content

Commit

Permalink
feat: Pass all task options to TS modifiers (#18934)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- authored Mar 12, 2024
1 parent d4b957d commit 898aa32
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ protected String getFileContent() {
lines.addAll(getThemeLines());

for (TypeScriptBootstrapModifier modifier : modifiers) {
modifier.modify(lines, options.isProductionMode(),
frontDeps.getThemeDefinition());
modifier.modify(lines, options, frontDeps);
}
return String.join(System.lineSeparator(), lines);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,26 @@ default void modify(List<String> bootstrapTypeScript,
* @param themeDefinition
* the theme used by the application
*/
@Deprecated
default void modify(List<String> bootstrapTypeScript,
boolean productionMode, ThemeDefinition themeDefinition) {
modify(bootstrapTypeScript, productionMode);
}

/**
* Modifies the bootstrap typescript by mutating the parameter.
*
* @param bootstrapTypeScript
* the input typescript split into lines
* @param options
* options used by the build
* @param frontendDependenciesScanner
* the frontend dependencies scanner
*/
default void modify(List<String> bootstrapTypeScript, Options options,
FrontendDependenciesScanner frontendDependenciesScanner) {
modify(bootstrapTypeScript, options.isProductionMode(),
frontendDependenciesScanner.getThemeDefinition());
}

}

0 comments on commit 898aa32

Please sign in to comment.