Package com.vaadin.flow.server.frontend
Class GenerateMainImports
java.lang.Object
com.vaadin.flow.server.frontend.GenerateMainImports
- All Implemented Interfaces:
Runnable
Collect generated-flow-imports content for project to use to determine if
dev-bundle contains all required imports.
Only used when checking if dev bundle need to be rebuild in dev mode without a dev server.
For internal use only. May be renamed or removed in a future release.
-
Constructor Summary
ConstructorsConstructorDescriptionGenerateMainImports(FrontendDependenciesScanner frontendDepScanner, Options options, tools.jackson.databind.JsonNode statsJson) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddCssLines(Collection<String> lines, CssData cssData, int i) Adds CSS imports to the generated flow imports file based on the given CssImport data.protected voidaddLines(Collection<String> lines, String content) protected StringgetLines()protected org.slf4j.LoggerGet logger for this instance.protected Stringprotected booleanimportedFileExists(String importName) Validate that the fileimportNamecan be found.protected booleanIf in memory collection we are collecting for devBundle check.protected StringresolveResource(String importPath) voidrun()protected voidwriteOutput(Map<File, List<String>> outputFiles)
-
Constructor Details
-
GenerateMainImports
public GenerateMainImports(FrontendDependenciesScanner frontendDepScanner, Options options, tools.jackson.databind.JsonNode statsJson)
-
-
Method Details
-
getLines
-
writeOutput
-
addCssLines
Adds CSS imports to the generated flow imports file based on the given CssImport data.- Parameters:
lines- collection of generated file lines to add imports tocssData- CssImport datai- imported CSS counter- Returns:
- true if the imported CSS files does exist, false otherwise
-
getLogger
protected org.slf4j.Logger getLogger()Get logger for this instance.- Returns:
- a logger
-
inMemoryCollection
protected boolean inMemoryCollection()If in memory collection we are collecting for devBundle check.- Returns:
trueif devBundle in memory collecting
-
getImportsNotFoundMessage
-
importedFileExists
Validate that the fileimportNamecan be found.- Parameters:
importName- name of the file- Returns:
trueif file is found
-
run
public void run() -
resolveResource
-
addLines
-
getThemeIdPrefix
-
merge
-