commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r956275 - in /commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf: SCXMLCompiler.js util/xml.js
Date Sat, 19 Jun 2010 19:43:09 GMT
Author: jbeard
Date: Sat Jun 19 19:43:08 2010
New Revision: 956275

URL: http://svn.apache.org/viewvc?rev=956275&view=rev
Log:
Added small hack to get RequireJS working with js_beautify in both browser and Rhino environments.
This is something that should be fixed later.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/SCXMLCompiler.js
    commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/util/xml.js

Modified: commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/SCXMLCompiler.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/SCXMLCompiler.js?rev=956275&r1=956274&r2=956275&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/SCXMLCompiler.js
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/SCXMLCompiler.js
Sat Jun 19 19:43:08 2010
@@ -32,7 +32,8 @@ require.def("src/javascript/scxml/cgf/SC
 		"src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator",
 		"src/javascript/scxml/cgf/Transformer",
 		"src/javascript/scxml/cgf/util/base",
-		"lib/js/beautify.js"],
+		//small hack. RequireJS seems to resolve the path differently between Rhino and browser
+		require.isBrowser ? "/lib/js/beautify.js" : "lib/js/beautify.js"],
 	
 	function(
 		StatePatternStatechartGenerator,

Modified: commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/util/xml.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/util/xml.js?rev=956275&r1=956274&r2=956275&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/util/xml.js
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/javascript/scxml/cgf/util/xml.js
Sat Jun 19 19:43:08 2010
@@ -60,7 +60,7 @@ function(){
 						return xmlDoc;
 					};
 
-	var parseFromPath = !require.browser	?
+	var parseFromPath = !require.isBrowser	?
 				(function(){
 					var File = java.io.File;
 					var DocumentBuilderFactory = javax.xml.parsers.DocumentBuilderFactory;



Mime
View raw message