com.vaadin.flow.server.frontend.
Class DevBundleUtils
Helpers related to the development bundle.
For internal use only. May be renamed or removed in a future release.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
compressBundle
(File projectDir, File devBundleFolder) Compress the dev bundle at give location into src/main/bundles.
static URL
findBundleFile
(File projectDir, String buildFolder, String filename) Finds the given file inside the current development bundle.
static String
findBundleStatsJson
(File projectDir, String buildFolder) Get the stats.json for the application specific development bundle.
static File
getDevBundleFolder
(File projectDir, String buildFolder) Get the folder where an application specific bundle is stored.
static void
unpackBundle
(File projectDir, File devBundleFolder) Unpack the compressed dev bundle from src/main/bundles if it exists into the given location.
-
Method Details
-
findBundleFile
public static URL findBundleFile(File projectDir, String buildFolder, String filename) throws IOException Finds the given file inside the current development bundle.
Parameters:
projectDir
- the project root folderbuildFolder
- the project build folder namefilename
- the file name inside the bundleReturns:
a URL referring to the file inside the bundle or
null
if the file was not foundThrows:
-
getDevBundleFolder
Get the folder where an application specific bundle is stored.
Parameters:
projectDir
- the project base directorybuildFolder
- the project build folder nameReturns:
the bundle directory
-
findBundleStatsJson
Get the stats.json for the application specific development bundle.
Parameters:
projectDir
- the project base directorybuildFolder
- the project build folder nameReturns:
stats.json content or
null
if not foundThrows:
IOException
- if an I/O exception occurs. -
compressBundle
Compress the dev bundle at give location into src/main/bundles.
Parameters:
projectDir
- current project root directorydevBundleFolder
- dev bundle location -
unpackBundle
Unpack the compressed dev bundle from src/main/bundles if it exists into the given location.
Parameters:
projectDir
- current project root directorydevBundleFolder
- unpacked dev bundle location
-