KT-3008 Implement AMD, CommonJS and UMD wrappers. Compile stdlib and builtins modules into separate JS files and wrap them in UMD.
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ public class K2JSCompilerArguments extends CommonCompilerArguments {
|
||||
public String target;
|
||||
|
||||
@Argument(value = "module-kind", description = "Kind of a module generated by compiler. Supported values are: plain (by default), " +
|
||||
"amd, commonjs.")
|
||||
"amd, commonjs, umd.")
|
||||
public String moduleKind;
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -287,6 +287,9 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
||||
else if (moduleKindName.equals("commonjs")) {
|
||||
moduleKind = ModuleKind.COMMON_JS;
|
||||
}
|
||||
else if (moduleKindName.equals("umd")) {
|
||||
moduleKind = ModuleKind.UMD;
|
||||
}
|
||||
else {
|
||||
messageCollector.report(CompilerMessageSeverity.ERROR, "Unknown module kind: " + moduleKindName + ". " +
|
||||
"valid values are: plain, amd, commonjs",
|
||||
|
||||
Reference in New Issue
Block a user