jgonera | 16 Jun 2012 18:18
Picon
Gravatar

Dojo 1.7 and RequireJS

Hi,

I posted it also on the RequireJS Google Group, but maybe here someone will
be able to answer too. Is it possible to run Dojo 1.7.2 with RequireJS
2.0.2? I tried but got a bunch of errors:

Uncaught TypeError: Object function (){var
g=ga.call(arguments,0),e;if(f&&w(e=g[g.length-1]))e.__requireJsBuild=!0;g.push(d);return
b.apply(null,g)} has no method 'ready' ready.js:63
Uncaught TypeError: Cannot use 'in' operator to search for
'/js/vendor/dijit/templates/TreeNode.html?bust=1339860132949' in undefined
text.js:82
Uncaught TypeError: Cannot use 'in' operator to search for
'/js/vendor/dijit/templates/Dialog.html?bust=1339860132949' in undefined
text.js:82
XHR finished loading:
"http://localhost:3000/js/vendor/ace/lib/ace/css/editor.css?bust=1339860132949".
net.js:21
Uncaught TypeError: Cannot use 'in' operator to search for
'/js/vendor/dijit/templates/Menu.html?bust=1339860132949' in undefined
text.js:82
Uncaught TypeError: Object function (){var
g=ga.call(arguments,0),e;if(f&&w(e=g[g.length-1]))e.__requireJsBuild=!0;g.push(d);return
b.apply(null,g)} has no method 'ready' ready.js:63
Uncaught TypeError: Object function (){var
g=ga.call(arguments,0),e;if(f&&w(e=g[g.length-1]))e.__requireJsBuild=!0;g.push(d);return
b.apply(null,g)} has no method 'ready' ready.js:63

Is there any up-to-date template somewhere? Should I use domReady and
somehow bind it to require.ready()? I'd like to use RequireJS instead of
(Continue reading)

Dylan Schiemann | 17 Jun 2012 17:05
Favicon
Gravatar

Re: Dojo 1.7 and RequireJS


Dojo's build system doesn't require Java... you can use Node with
Closure compiler by changing your build script to use Closure instead of
ShrinkSafe.

Regards,
-Dylan

on 6/16/12 9:18 AM (GMT-07:00) jgonera said the following:
> Hi,
> 
> I posted it also on the RequireJS Google Group, but maybe here someone will
> be able to answer too. Is it possible to run Dojo 1.7.2 with RequireJS
> 2.0.2? I tried but got a bunch of errors:
> 
> Uncaught TypeError: Object function (){var
> g=ga.call(arguments,0),e;if(f&&w(e=g[g.length-1]))e.__requireJsBuild=!0;g.push(d);return
> b.apply(null,g)} has no method 'ready' ready.js:63
> Uncaught TypeError: Cannot use 'in' operator to search for
> '/js/vendor/dijit/templates/TreeNode.html?bust=1339860132949' in undefined
> text.js:82
> Uncaught TypeError: Cannot use 'in' operator to search for
> '/js/vendor/dijit/templates/Dialog.html?bust=1339860132949' in undefined
> text.js:82
> XHR finished loading:
> "http://localhost:3000/js/vendor/ace/lib/ace/css/editor.css?bust=1339860132949".
> net.js:21
> Uncaught TypeError: Cannot use 'in' operator to search for
> '/js/vendor/dijit/templates/Menu.html?bust=1339860132949' in undefined
> text.js:82
(Continue reading)

jgonera | 17 Jun 2012 18:37
Picon
Gravatar

Re: Dojo 1.7 and RequireJS

The docs says:

> The build tool itself relies on Java (and, optionally, Node.js for even
> faster builds), so make sure that have you that installed as well.
(http://dojotoolkit.org/documentation/tutorials/1.7/build/)

I read that as: you must have Java and, if you want faster builds,
additionally Node.js.

I'm not actually sure where you got the information that Closure has a
Node.js version. Dojo's repo contains only a .jar:
https://github.com/dojo/util/tree/master/closureCompiler
I also can't see anything about Node.js on the official page:
https://developers.google.com/closure/compiler/

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-1-7-and-RequireJS-tp3986571p3986581.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Karl Tiedt | 17 Jun 2012 18:48
Picon
Gravatar

Re: Dojo 1.7 and RequireJS

Closure does indeed require java... There is a patch for uglify.js in trac though

________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
jgonera | 17 Jun 2012 22:26
Picon
Gravatar

Re: Dojo 1.7 and RequireJS

I saw it. Is this patch already included in the official repo? I browsed the
commits at https://github.com/dojo/util but couldn't find anything.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-1-7-and-RequireJS-tp3986571p3986586.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Karl Tiedt | 17 Jun 2012 23:19
Picon
Gravatar

Re: Dojo 1.7 and RequireJS

I do not believe the ticket is closed.... so no it is not checked in yet.

-Karl Tiedt
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

jgonera | 18 Jun 2012 03:11
Picon
Gravatar

Re: Dojo 1.7 and RequireJS

I see, I hope it gets merged soon. Meanwhile, I thought that I can try
building without compressing and then just compress the final build file
with Uglify. By the way, I don't understand why both RequireJS and Dojo's
builder compress all the JS file before assembling them instead of just
compressing the final files.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-1-7-and-RequireJS-tp3986571p3986591.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

Dojo-interest <at> mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


Gmane