Home

Awesome

UMD (Universal Module Definition)

Build Status

This repository formalizes the design and implementation of the Universal Module Definition (UMD) API for JavaScript modules. These are modules which are capable of working everywhere, be it in the client, on the server or elsewhere.

The UMD pattern typically attempts to offer compatibility with the most popular script loaders of the day (e.g RequireJS amongst others). In many cases it uses AMD as a base, with special-casing added to handle CommonJS compatibility.

Variations

Regular Module

jQuery Plugin

AMD with simple Node/CommonJS adapter

These are useful for using AMD style while still making modules that can be used in Node and installed via npm without extra dependencies to set up the full AMD API.

This approach does not allow the use of AMD loader plugins, just basic JS module dependencies. It also does not support the callback-style require that is usable in AMD.

Tooling

Build tools

Testing

Resources

Todos

Influences

The basic pattern for the UMD variations in this repository was derived from the approach @kriskowal used for the Q promise library.

Earlier UMD variations were also of influence, ranging from Kit-Cambridge's UMD, through to patterns discussed by Addy Osmani, Thomas Davis and Ryan Florence and most recently the UMD patterns proposed by James Burke.

License

Copyright (c) the UMD contributors

Licensed under the MIT License.