@@ -0,0 +1,1117 @@
+package com.redhat.ceylon.compiler.js;%0A%0Aimport java.io.File;%0Aimport java.io.FileWriter;%0Aimport java.io.IOException;%0Aimport java.io.Writer;%0Aimport java.util.HashMap;%0Aimport java.util.HashSet;%0Aimport java.util.Map;%0Aimport java.util.Set;%0A%0Aimport com.redhat.ceylon.compiler.typechecker.model.Module;%0A%0A/** A container for things we need to keep per-module. */%0Aclass JsOutput %7B%0A    private File outfile;%0A    private Writer writer;%0A    private final Set%3CString%3E s = new HashSet%3CString%3E();%0A    final Map%3CString,String%3E requires = new HashMap%3CString,String%3E();%0A    final MetamodelVisitor mmg;%0A    protected JsOutput(Module m) throws IOException %7B%0A        mmg = new MetamodelVisitor(m);%0A    %7D%0A    protected Writer getWriter() throws IOException %7B%0A        if (writer == null) %7B%0A            outfile = File.createTempFile(%22jsout%22, %22.tmp%22);%0A            writer = new FileWriter(outfile);%0A        %7D%0A        return writer;%0A    %7D%0A    protected File close() throws IOException %7B%0A        writer.close();%0A        return outfile;%0A    %7D%0A    void addSource(String src) %7B%0A        s.add(src);%0A    %7D%0A    Set%3CString%3E getSources() %7B return s; %7D%0A%7D

Move this class out of JsCompiler into its own