A small, fast, and modern AMD loader node.js and the browser
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
LICENSE.txt
README.md
bower.json
load.js
package.json

README.md

bd-load

The Backdraft AMD loader by ALTOVISO.

Build status Dependencies devDependencies

The fastest and smallest AMD loader ever built

Features

  • Extremely compact--less than 500 lines of code

  • Algorithms optimized to theoretical minimum time complexity possible

  • Executes on node.js and in the browser

  • Includes the features required to construct large applications

  • Does not include unnecessary, outdated, and/or naive features present in other loaders

  • Fully leverages JS6

Why Another Version of bd-load?

Version 1.x of bd-load was rolled into Dojo back in 2011 and is probably the second-most used AMD loader next to Requirejs. It is still the most capable AMD loader today and contains many features and capabilities not available in other loaders. It is also one of the fastest and smallest.

Although it was important to add tons of capabilities and features into the loader back six years ago for historical and marketing reasons, much of that machinery was never needed to build optimal applications.

###Most AMD loaders either solve problems we don't care about--and are therefore bloated--or are poorly built...or both!

Furthermore, AMD loaders bring some configuration capability not currently available with ES6 modules, so they are still relevant.

###bd-load implements exactly the features needed to build modern applications and leverages ES6 to express the fastest and smallest AMD loader ever built.

If you want to write programs that have a loader 5X bigger, slower, and does foolish things like scans module text for require statements, bd-load is not the loader for you.

If you want to load AMD- or UMD-compliant modules in either the browser or node while incurring the minimum cost in time and space, then bd-load is likely the best option.

Installation

With npm:

npm install bd-load

With yarn:

yarn add bd-load

With bower:

bower install --save bd-load

History

Though not common knowledge, bd-load has been in wide-scale continuous use with Dojo since 2011. The project was initially made public in late 2010 and rapidly incorporated into the Dojo Toolkit culminating in release 1.5 of Dojo.

The v1.x loader is extremely advanced and implements the original Dojo synchronous and cross-domain APIs as well as the AMD API. It includes many still-novel features, and can be built exemplifying one of the smallest and fastest AMD-compatible loaders available using the Dojo build system (also originally an ALTOVISO project).

From mid 2011, almost all maintenance of the backdraft loader took place within the Dojo project. In late 2012, a prototype space-optimized version of the loader (bdload-so.js) was constructed.

Since JS6 includes several features that make a smaller loader possible, and further since the typical loaders available are packed full of cruft, outdated APIs, and naive features, ALTOVISO built and released v2.x of bd-load in early 2017.

Status

The loader is currently being used in commercial projects. It includes tests that prove most of the AMD specification. Currently the plugin API is not available, and, since we find that API unnecessary, there are no plans to add it.

License

bd-load is free and open source software available under a BSD-3-Clause license.