com.vaadin.flow.server.frontend.

Class ProdBundleUtils

java.lang.Object
com.vaadin.flow.server.frontend.ProdBundleUtils
public class ProdBundleUtils extends Object

Helpers related to the production bundle.

For internal use only. May be renamed or removed in a future release.

  • Method Details

    • getProdBundle

      public static File getProdBundle(File projectDir)

      Get the application specific production bundle file.

      Parameters:

      projectDir - the project base directory

      Returns:

      the bundle directory

    • findBundleStatsJson

      public static String findBundleStatsJson(File projectDir, ClassFinder finder) throws IOException

      Get the stats.json for the application specific production bundle or from the default bundle if it exists.

      Parameters:

      projectDir - the project base directory

      finder - class finder

      Returns:

      stats.json content or null if not found

      Throws:

      IOException - if an I/O exception occurs.

    • compressBundle

      public static void compressBundle(File projectDir, File prodBundleFolder)

      Compress the prod bundle at give location into src/main/bundles.

      Parameters:

      projectDir - current project root directory

      prodBundleFolder - prod bundle location

    • unpackBundle

      public static void unpackBundle(File projectDir, File prodBundleFolder)

      Unpack the compressed prod bundle from src/main/bundles if it exists into the given location.

      Parameters:

      projectDir - current project root directory

      prodBundleFolder - unpacked prod bundle location