The first step in order to extend support for different libraries of these kind is to implement the following requirements.
CLI & buildtools
Console compiler has -libraryFiles option, which value is a comma-separated list of paths to jar-files or folders. It is assumed that each folder is really an expanded version of some valid jar-archive library, in particular, it should contain manifest file META-INF/MANIFEST.MF.
Libraries could also be specified as dependencies for maven project and added to IntelliJ IDEA project.
Console compiler and build tools will support an option for generating meta information.
output directory for runtime library files (default value is “lib”, relative to the directory which contains output file).
For each library we have semantically two step process:
1) recursively copy js files from library directory or archive except META-INF directory with saving directory structure;
2), recursively copy js files from META-INF/resources subdirectory of library directory or archive with saving directory structure. This could be useful for JVM-based containers (see http://www.webjars.org/documentation#servlet3).
Questions and comments are welcomed.