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:
Alexey Andreev
2016-04-12 10:36:31 +03:00
parent 95b78e18df
commit 848d7f92fa
14 changed files with 229 additions and 57 deletions
@@ -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",