js compiler: module dependency

This commit is contained in:
develar
2012-06-19 19:23:05 +04:00
parent cd067cb32c
commit 06ecb45004
13 changed files with 165 additions and 73 deletions
@@ -151,10 +151,10 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments, K2JSCompile
@NotNull
private static Config getConfig(@NotNull K2JSCompilerArguments arguments, @NotNull Project project) {
EcmaVersion ecmaVersion = EcmaVersion.fromString(arguments.target);
if (arguments.libzip == null) {
if (arguments.libraryFiles == null) {
// lets discover the JS library definitions on the classpath
return new ClassPathLibraryDefintionsConfig(project, ecmaVersion);
}
return new ZippedLibrarySourcesConfig(project, arguments.libzip, ecmaVersion);
return new LibrarySourcesConfig(project, arguments.libraryFiles, ecmaVersion);
}
}
@@ -36,8 +36,8 @@ public class K2JSCompilerArguments extends CompilerArguments {
public String outputFile;
//NOTE: may well be a subject to change soon
@Argument(value = "libzip", description = "Path to zipped lib sources")
public String libzip;
@Argument(value = "libraryFiles", description = "Path to zipped lib sources or kotlin files")
public String[] libraryFiles;
@Argument(value = "srcdir", description = "Sources directory")
public String srcdir;