Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Now using RequireJS to manage module dependencies
Browse files Browse the repository at this point in the history
All modules in source and unit tests have been converted to use the CommonJS
Asynchronous Module Definition format expected by RequireJS.

Tests page for each module have been modified to use RequireJS to load modules
dynamically, based on dependencies declared in each module.

The "all tests" page for the combined/minified script uses an alternate
implementation of CommonJS AMD, located in src/amd/define.js. We developed this
null implementation does not load modules; it only runs the factory functions
registered in define() calls with expected arguments.

We modified the build process to use the RequireJS optimization tool, which
looks up dependencies in each module by parsing the script files. RequireJS
itself is not included in the combined script; it is replaced with our lighter
alternative "amd/define".

Both the combined (lb-full.js) and the minified (lb-min.js) scripts maintain
the backward compatibility with existing projects: each module still registers
itself in a namespace hierarchy in the global variable window.lb.

In addition, modules can now be loaded dynamically; lb modules must be prefixed
by "lb/", e.g. "lb/lb.core.application" in define() and require() calls.
  • Loading branch information
Eric Bréchemier committed Jul 8, 2011
1 parent f92a899 commit fb7c0f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ HISTORY
2011-06-03, v1.7.4, Upgraded Closure Library to add support for IE9
2011-06-06, v1.7.5, Removed Combiner tool, cleaned-up build script
2011-06-07, v1.7.6, Moved Ant macros to a separate file to facilitate reuse
2011-XX-XX, v1.8.0, ROADMAP: Now using RequireJS to manage dependencies
2011-07-08, v1.8.0, Now using RequireJS to manage module dependencies
2011-XX-XX, v1.8.1, ROADMAP: Upgraded and renamed JSLint, updated Ant macro
2011-XX-XX, v1.9.0, ROADMAP: add foreach(), map(), reduce() in array API
2011-XX-XX, v1.10.0, ROADMAP: add animate() method to CSS API of Sandbox
Expand Down

0 comments on commit fb7c0f9

Please sign in to comment.