Thursday, February 18, 2010

RequireJS 0.8.0 Released

RequireJS, the next generation in script loading, now has an official release and a new web site: http://requirejs.org.

The 0.8.0 release is a formal release of the code, and it includes built versions of jQuery 1.4.2 with RequireJS already integrated.

I also updated my jQuery fork to include the latest changes -- jQuery's page load callbacks will not fire unless all scripts loaded with RequireJS have also finished loading.

I plan to do integrations with other browser toolkits, MooTools and Prototype being next on my list. I also hope the jQuery community will want to pull the changes I have in my jQuery fork into their master at some point.

If you are a team member for one of these toolkits, please let me know what I can do in RequireJS to provide the best code loading and module format for browser-based toolkits. It would be great if we can reach consensus on code loading. I am happy to make changes in RequireJS if it moves us all closer to that.

While the release version is 0.8, this code has been battle-tested in Raindrop, a sizable JavaScript-centric messaging web app. Raindrop uses a version of Dojo 1.4 that has been converted to the RequireJS module format, and all Raindrop modules are written as RequireJS modules.

Some other notes about the release:
Give it a spin! There is a moderated list if you have questions or need support.

2 comments:

e.plischke said...

really kicks ass! thanks man, however you could replace the token:

"for(m=w.length-1;p=w[m];m--){"
by
"m=w.length;while(p!=w[m]){--m;"

in the minidifed source found at http://requirejs.org/docs/release/0.8.0/minified/require.js to get rid of the error "Index or size is negative or greater than the allowed amount" code: 1" which is shown in FF

,br

James Burke said...

e.plischke: thanks, the issue you report has already been fixed in the latest code in GitHub, I was being too optimistic about the file name not changing. The fix should appear in a 0.8.1 release that I hope to do in the next few days.