AMD API Shims
Clone this wiki locally
These are some AMD API providers that can be used after a build is done and no dynamic loading is needed. Typically these AMD API implementations are smaller than RequireJS because they do not do dynamic loading or deferred loading, and they may cut out some other features of RequireJS to get to a smaller size.
- almond: Tracks RequireJS features, but cuts out dynamic loading. See README for full list of restrictions.
- Hazelnut: A full AMD shim in 347 bytes. Intended as a tiny drop-in replacement for almond.
- https://gist.github.com/3861744 AMD in 11 lines of code. No script loading. It offers a valid subset of AMD features for browsers (so you can switch to a loader at any time). Intended for distributing browser builds of your library to folks that don't use a script loader.
- Vaccine: Configureable AMD (and CommonJS) shims for libraries. Takes your library's specific needs into account to keep the size as small as possible.
- define.isDefined: Fork of Almond which adds a simple method to check whether a particular module has been defined.
- require.r.js: Has only 295 bytes and it doesn't define any global variables (instead of "define" and "require" functions). Supports unordered definitions, see readme
- amdshim: Super small AMD shim with simple path resolution.
Have a small AMD shim? Add it to the list, and either list the feature restrictions in this page or list them with the implementation in some fashion.