JS backend: don't add file:// prefix to sourcemap url.

Use name of generated source map file instead of absolute path.

(cherry picked from commit 126e977 and ec2fc20)
This commit is contained in:
develar
2013-09-20 17:10:53 +04:00
committed by Zalim Bashorov
parent 6878a0b657
commit cee4668e47
@@ -131,8 +131,9 @@ public class SourceMap3Builder implements SourceMapBuilder {
@Override
public void addLink() {
textOutput.print("\n//@ sourceMappingURL=file://");
textOutput.print(getOutFile().getAbsolutePath());
textOutput.print("\n//@ sourceMappingURL=");
textOutput.print(generatedFile.getName());
textOutput.print(".map");
}
private static final class Base64VLQ {
@@ -146,6 +147,7 @@ public class SourceMap3Builder implements SourceMapBuilder {
// The continuation bit is the 6th bit.
private static final int VLQ_CONTINUATION_BIT = VLQ_BASE;
@SuppressWarnings("SpellCheckingInspection")
private static final char[] BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
private Base64VLQ() {