public class FrontendDataProvider extends Object
FrontendToolsManager to process project
frontend files.| Constructor and Description |
|---|
FrontendDataProvider(boolean shouldBundle,
boolean shouldMinify,
boolean shouldHash,
File es6SourceDirectory,
AnnotationValuesExtractor annotationValuesExtractor,
File fragmentConfigurationFile,
String webComponentOutputDirectoryName,
Map<String,Set<String>> userDefinedFragments)
Creates the data provider.
|
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
createFragmentFiles(File targetDirectory)
If bundling is enabled, creates fragment files required for the bundling,
if any were configured.
|
String |
createShellFile(File targetDirectory)
Creates a shell file that contains all application imports excluding the
ones included into fragments (if any).
|
protected ThemedURLTranslator |
getTranslator(File es6SourceDirectory,
com.vaadin.flow.migration.ClassPathIntrospector introspector)
Gets the URL translator to rewrite URL using the theme in declared in the
application.
|
protected WebComponentModulesGenerator |
getWebComponentGenerator(com.vaadin.flow.migration.ClassPathIntrospector introspector)
Gets web component module content generator.
|
boolean |
shouldBundle()
Gets the information whether should the plugin bundle the frontend files
or not.
|
boolean |
shouldHash()
Gets the information whether should the plugin rename the output files by
adding a hash fragment.
|
boolean |
shouldMinify()
Gets the information whether should the plugin minify the output files or
not.
|
public FrontendDataProvider(boolean shouldBundle,
boolean shouldMinify,
boolean shouldHash,
File es6SourceDirectory,
AnnotationValuesExtractor annotationValuesExtractor,
File fragmentConfigurationFile,
String webComponentOutputDirectoryName,
Map<String,Set<String>> userDefinedFragments)
shouldBundle - whether bundling data should be preparedshouldMinify - whether the output files should be minifiedshouldHash - whether the output file names should containt a fingerprintes6SourceDirectory - the directory with original ES6 files, not nullannotationValuesExtractor - extractor for getting all required values from project to
prepare its resources properly, not nullfragmentConfigurationFile - path to external configuration file with fragments, may be
nullwebComponentOutputDirectoryName - folder name inside es6SourceDirectory where web
component module files will be generated, not nulluserDefinedFragments - another list of fragments, if user preferred to specify them
without external configuration file, not nullpublic boolean shouldBundle()
true if bundling should be performed, false
otherwisepublic boolean shouldMinify()
true if minification should be performed, false
otherwisepublic boolean shouldHash()
true if renaming of fragments to include a hash part
should be performedpublic Set<String> createFragmentFiles(File targetDirectory)
targetDirectory - the directory to create the files intopublic String createShellFile(File targetDirectory)
FrontendToolsManager to process the application filestargetDirectory - the directory to create the file intoprotected ThemedURLTranslator getTranslator(File es6SourceDirectory, com.vaadin.flow.migration.ClassPathIntrospector introspector)
es6SourceDirectory - the directory with original ES6 files, not nullintrospector - the introspector whose classpath will be used for returned
translatorprotected WebComponentModulesGenerator getWebComponentGenerator(com.vaadin.flow.migration.ClassPathIntrospector introspector)
introspector - the introspector whose classpath will be used for returned
generatorCopyright © 2025. All rights reserved.