This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.IOException; | |
import java.net.URL; | |
public class FileBasedResourceLoader extends CachingResourceLoader { | |
private File root = null; | |
public FileBasedResourceLoader(File root) { | |
this.root = root; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.StringReader; | |
import java.io.StringWriter; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.dojotoolkit.json.JSONParser; | |
import org.dojotoolkit.json.JSONSerializer; | |
import org.dojotoolkit.rt.v8.V8Exception; | |
import org.dojotoolkit.rt.v8.V8JavaBridge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.IOException; | |
import java.net.URL; | |
import org.dojotoolkit.compressor.JSCompressorFactory; | |
import org.dojotoolkit.compressor.JSCompressorResourceLoader; | |
public class FileBasedCompressingResourceLoader extends JSCompressorResourceLoader { | |
private File root = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.dojotoolkit.optimizer.JSAnalysisData; | |
import org.dojotoolkit.optimizer.JSOptimizer; | |
import org.dojotoolkit.optimizer.JSOptimizerFactory; | |
import org.dojotoolkit.optimizer.Localization; | |
import org.dojotoolkit.optimizer.rhino.RhinoJSOptimizerFactory; | |
private void runRhinoOptimizerNoCompressor() { | |
ResourceLoader resourceLoader = new FileBasedResourceLoader(new File("/pathToResources")); | |
RhinoClassLoader rhinoClassLoader = new RhinoClassLoader(resourceLoader); | |
JSOptimizerFactory factory = new RhinoJSOptimizerFactory(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.dojotoolkit.compressor.JSCompressorFactory; | |
import org.dojotoolkit.compressor.uglifyjs.rhino.RhinoUglifyJSCompressorFactory; | |
import org.dojotoolkit.optimizer.JSAnalysisData; | |
import org.dojotoolkit.optimizer.JSOptimizer; | |
import org.dojotoolkit.optimizer.JSOptimizerFactory; | |
import org.dojotoolkit.optimizer.Localization; | |
import org.dojotoolkit.optimizer.rhino.RhinoJSOptimizerFactory; | |
import org.dojotoolkit.server.util.resource.ResourceLoader; | |
import org.dojotoolkit.server.util.rhino.RhinoClassLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.dojotoolkit.optimizer.JSAnalysisData; | |
import org.dojotoolkit.optimizer.JSOptimizer; | |
import org.dojotoolkit.optimizer.JSOptimizerFactory; | |
import org.dojotoolkit.optimizer.Localization; | |
import org.dojotoolkit.optimizer.v8.V8JSOptimizerFactory; | |
import org.dojotoolkit.server.util.resource.ResourceLoader; | |
import org.dojotoolkit.server.util.rhino.RhinoClassLoader; | |
private void runV8OptimizerNoCompressor() { | |
ResourceLoader resourceLoader = new FileBasedResourceLoader(new File("pathToResources")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.dojotoolkit.compressor.JSCompressorFactory; | |
import org.dojotoolkit.compressor.uglifyjs.v8.V8UglifyJSCompressorFactory; | |
import org.dojotoolkit.optimizer.JSAnalysisData; | |
import org.dojotoolkit.optimizer.JSOptimizer; | |
import org.dojotoolkit.optimizer.JSOptimizerFactory; | |
import org.dojotoolkit.optimizer.Localization; | |
import org.dojotoolkit.optimizer.v8.V8JSOptimizerFactory; | |
import org.dojotoolkit.server.util.resource.ResourceLoader; | |
import org.dojotoolkit.server.util.rhino.RhinoClassLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import org.dojotoolkit.rt.v8.V8JavaBridge; | |
import org.dojotoolkit.server.util.resource.ResourceLoader; | |
public class V8CommonJSLoader extends V8JavaBridge { | |
private ResourceLoader resourceLoader = null; | |
public V8CommonJSLoader(ResourceLoader resourceLoader) { | |
super(true); | |
this.resourceLoader = resourceLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import org.dojotoolkit.server.util.resource.ResourceLoader; | |
import org.dojotoolkit.server.util.rhino.RhinoClassLoader; | |
import org.dojotoolkit.server.util.rhino.RhinoJSMethods; | |
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.ScriptableObject; | |
public class RhinoCommonJSLoader { | |
private RhinoClassLoader rhinoClassLoader = null; | |
private ResourceLoader resourceLoader = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.IOException; | |
import java.net.URL; | |
import org.dojotoolkit.compressor.JSCompressorFactory; | |
import org.dojotoolkit.compressor.JSCompressorResourceLoader; | |
public class MultiRootResourceLoader extends JSCompressorResourceLoader { | |
private File[] roots = null; |
OlderNewer