// Generate sample JS code that is equivalent but that loads at // very different rates on different browsers // Posted on blog.lexspoon.org on June 29, 2010 ///////////// OPTIONS /////////////////////////// // Whether to indirect all global variables through a jslink object val jslink = false // Whether to emit a wrapper function val wrapper = true // Whether to chunk the body of the wrapper function into smaller functions val chunk = false ///////////// IMPLEMENTATION /////////////////////////// import java.io.FileWriter import java.io.PrintWriter // write out test.html { val out = new PrintWriter(new FileWriter("test.html")) out.println(""" """) out.close() } // write out module.html { val out = new PrintWriter(new FileWriter("module.html")) out.println(""" """) out.close() }