Tuesday, October 18, 2011

RequireJS 1.0 released

Hell yeah. Get it now.

This release is basically the same as the 0.27.1 release. There was just one change, to a regexp used by the optimizer when it converts CommonJS modules to AMD modules via its -convert flag.

This release has been two years in the making. The code and APIs have changed over time based on feedback from the community, and now there are some very strong AMD loaders besides RequireJS. The AMD API and RequireJS have been proven useful and used in real projects.

I created a new Why AMD document if you want to learn more about why the AMD API exists and how you can use it.

I still plan on doing RequireJS releases and pushing modular JavaScript forward. This is not the end, but it is an important milestone. Thank you to the RequireJS and AMD communities for making this release.

Go use it already!
Let's make modular JS a reality on the web today.

Friday, October 07, 2011

RequireJS 0.27.1 released

RequireJS 0.27.1 is available for download.

Just a small update with some bug fixes for 0.27.0. See the 0.27.0 release for the major functionality changes over previous releases.

I will wait about a week to see if this release seems stable for a 1.0 release.

  • define(id, function () {}) where the function has require('') dependencies will now be scanned for dependencies. Allows for smaller universal module adapters.
  • Loader plugin that depends on a different plugin's loaded resource works as it did in 0.26.0.
  • Optimizer: update UglifyJS to 1.1.
  • Optimizer: semicolons are inserted between files if concatenating would cause errors.
  • Optimizer: always strip BOM files on all platforms when file transforms/concatenations are done.
  • Optimizer: allow override of modules used in optimizer. Example.
  • Optimizer: allow copying of .directories via build config option.
  • Optimizer: Resolving paths for .js dependencies might fail if an appDir was not part of the config.

Sunday, October 02, 2011

RequireJS 0.27.0 released, 1.0 release candidate

RequireJS 0.27.0 is available for download.

This is the 1.0 release candidate. Unless things go horribly awry, I expect to do the 1.0 release in about a week. So please be sure to try it out soon if you have concerns. If you need more time to evaluate it, let me know.

From the release notes:
  • require.ready() has been removed. In its place, use the domReady plugin. This allows better interoperability with other AMD loaders and better separation of concerns.
  • A new wrap config option for the optimizer is available, for wrapping built code in a function. Allows for better API hiding and tiny builds with the almond API shim.
  • The order plugin is improved for IE.
  • Loader plugins can now have dependencies and they will work in the optimizer, as long as the dependencies work in the optimizer environment (Node, Rhino).
  • The namespace config option for the optimizer is more robust.
  • Removed require.def(), use define() instead.
  • Removed module.setExports, use module.exports instead.