Generate relative paths in JS source maps
Also, add CLI options to manipulate prefixes of path See KT-4078
This commit is contained in:
@@ -29,6 +29,12 @@ public class JSConfigurationKeys {
|
||||
public static final CompilerConfigurationKey<Boolean> SOURCE_MAP =
|
||||
CompilerConfigurationKey.create("generate source map");
|
||||
|
||||
public static final CompilerConfigurationKey<String> SOURCE_MAP_PREFIX =
|
||||
CompilerConfigurationKey.create("prefix to add to paths in source map");
|
||||
|
||||
public static final CompilerConfigurationKey<List<String>> SOURCE_MAP_SOURCE_ROOTS =
|
||||
CompilerConfigurationKey.create("base directories used to calculate relative paths for source map");
|
||||
|
||||
public static final CompilerConfigurationKey<Boolean> META_INFO =
|
||||
CompilerConfigurationKey.create("generate .meta.js and .kjsm files");
|
||||
|
||||
|
||||
@@ -103,6 +103,16 @@ public class JsConfig {
|
||||
return getConfiguration().getList(JSConfigurationKeys.LIBRARIES);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getSourceMapPrefix() {
|
||||
return configuration.get(JSConfigurationKeys.SOURCE_MAP_PREFIX, "");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<String> getSourceMapRoots() {
|
||||
return configuration.get(JSConfigurationKeys.SOURCE_MAP_SOURCE_ROOTS, Collections.singletonList("."));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<String> getFriends() {
|
||||
if (getConfiguration().getBoolean(JSConfigurationKeys.FRIEND_PATHS_DISABLED)) return Collections.emptyList();
|
||||
|
||||
Reference in New Issue
Block a user