params.initDefaults();
if (params.getEnvironment() == null) {
params.setEnvironment(createDefaultEnvironment(renderContext));
}
LibraryRequest request = new LibraryRequest(renderContext.request, null);
request.init(params);
request.setRegPath(false);
request.setInitJs(true);
request.setDebug(renderContext.mode == Mode.DEBUG);
output = library.generateJavaScript(request);
} catch (LibraryException e) {
e.printStackTrace();
throw new IOException("Error writing library init", e);