public static void endWrapper(Writer writer) throws IOException {
  writer.write("});\n");
  writer.write("}(typeof define==='function' && define.amd ? define : function (factory) {\n");
  writer.write("if (typeof exports!=='undefined') { factory(require, exports, module);\n");
  writer.write("} else { throw 'no module loader'; }\n");
  writer.write("}));\n");
}

public static void endWrapper ( Writer writer ) throws IOException { writer . write ( "});\n" ) ; writer . write ( "}(typeof define==='function' && define.amd ? define : function (factory) {\n" ) ; writer . write ( "if (typeof exports!=='undefined') { factory(require, exports, module);\n" ) ; writer . write ( "} else { throw 'no module loader'; }\n" ) ; writer . write ( "}));\n" ) ; }
writes the ending of the wrapper function for a js module .
