com.vaadin.flow.component.polymertemplate.
Class BundleParser
- java.lang.Object
-
- com.vaadin.flow.component.polymertemplate.BundleParser
-
@Deprecated public final class BundleParser extends Object
Deprecated.UseBundleLitParser
to parse Lit template since polymer template is deprecated, we recommend you to useLitTemplate
instead. Read more details from the Vaadin blog.Parse statistics data provided by webpack.
For internal use only. May be renamed or removed in a future release.
Since:
2.0
Author:
Vaadin Ltd
See Also:
-
-
Method Summary
All Methods Modifier and Type Method Description static String
getHashFromStatistics(String fileContents)
Deprecated.
Gets the hash from the string content of a webpack stats file.
static String
getSourceFromStatistics(String fileName, elemental.json.JsonObject statistics, VaadinService service)
Deprecated.
Get a module source from the statistics Json file generated by webpack.
static elemental.json.JsonObject
parseJsonStatistics(String fileContents)
Deprecated.
Parses the content of the stats file to return a json object.
static org.jsoup.nodes.Element
parseTemplateElement(String name, elemental.json.JsonObject statisticsJson)
Deprecated.
Get the template element for given statistics file object.
static org.jsoup.nodes.Element
parseTemplateElement(String fileName, String source)
Deprecated.
Get the Polymer template element for the given polymer template source.
-
-
-
Method Detail
-
getHashFromStatistics
public static String getHashFromStatistics(String fileContents)
Deprecated.Gets the hash from the string content of a webpack stats file. It uses regex to avoid parsing the entire string into a json object.
Parameters:
fileContents
- the content of the stats fileReturns:
the hash
-
parseJsonStatistics
public static elemental.json.JsonObject parseJsonStatistics(String fileContents)
Deprecated.Parses the content of the stats file to return a json object.
Parameters:
fileContents
- the content of the stats fileReturns:
a JsonObject with the stats
-
getSourceFromStatistics
public static String getSourceFromStatistics(String fileName, elemental.json.JsonObject statistics, VaadinService service)
Deprecated.Get a module source from the statistics Json file generated by webpack.
Parameters:
fileName
- name of the file to get from the jsonstatistics
- statistics json as a JsonObjectservice
- current VaadinServiceReturns:
JsonObject for the file statistic
-
parseTemplateElement
public static org.jsoup.nodes.Element parseTemplateElement(String name, elemental.json.JsonObject statisticsJson)
Deprecated.Get the template element for given statistics file object.
Parameters:
name
- the file name of the templatestatisticsJson
- webpack profile json objectReturns:
template element for the sources of the given file sources
-
parseTemplateElement
public static org.jsoup.nodes.Element parseTemplateElement(String fileName, String source)
Deprecated.Get the Polymer template element for the given polymer template source.
Parameters:
fileName
- name of the handled filesource
- source js to get template element fromReturns:
template element or {code null} if not found
-
-