Package com.google.javascript.jscomp
Class SourceMapResolver
- java.lang.Object
-
- com.google.javascript.jscomp.SourceMapResolver
-
@GwtIncompatible("Accesses the file system") public final class SourceMapResolver extends java.lang.Object
Utility class for resolving source maps and files referenced in source maps.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
addBase64PrefixToEncodedSourceMap(java.lang.String encoded)
Returns the encoded source map with the base64 prefix attached.static @Nullable SourceFile
extractSourceMap(SourceFile jsFile, java.lang.String sourceMapURL, boolean parseInlineSourceMaps)
For a given //# sourceMappingUrl, this locates the appropriate sourcemap on disk.
-
-
-
Method Detail
-
extractSourceMap
public static @Nullable SourceFile extractSourceMap(SourceFile jsFile, java.lang.String sourceMapURL, boolean parseInlineSourceMaps)
For a given //# sourceMappingUrl, this locates the appropriate sourcemap on disk. This is use for sourcemap merging (--apply_input_source_maps) and for error resolution.- Parameters:
parseInlineSourceMaps
- Whether to parse Base64 encoded source maps.
-
addBase64PrefixToEncodedSourceMap
public static java.lang.String addBase64PrefixToEncodedSourceMap(java.lang.String encoded)
Returns the encoded source map with the base64 prefix attached. (i.e. prefix with "data:application/json;base64,")E.g. turns "eyJ2ZXJzaW9uI..." into "data:application/json;base64,eyJ2ZXJzaW9uI..."
-
-