A custom implementation of amd.js.
This lib is an amd loader, and almostly has the same API with require.js
. So it's the alternative for those who are familiar with amd module system.
The biggest intention is to have some insight into require.js
and the amd
module system. I read part of the require.js
's source code, so code here is surely affected. And also thanks for other blogs about javascript module system.
View amd.js spec for details.
-
define([[id, ]deps, ]factory)
Define a standard amd module.
-
require(deps, callback)
Run callback after deps loaded.
Only normal usage case included here to test the lib, and test based on karma
.
npm test