# umdjs/umd

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/umdjs-umd).**

7,447 stars · 426 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/umdjs/umd
- awesome-repositories: https://awesome-repositories.com/repository/umdjs-umd.md

## Description

This project provides a universal module definition pattern and JavaScript module wrapper. It establishes a standardized methodology for distributing JavaScript libraries that function across CommonJS, AMD, and browser global environments.

The system uses an adapter approach to bridge different module systems, allowing a single file to operate in both Node.js and client-side browser environments without modification. This includes specific patterns for creating jQuery plugins that maintain compatibility across modular loaders and global scopes.

The codebase implements environment-detection logic and conditional wrapper patterns to identify the available module system at runtime. It utilizes immediately invoked function expressions for global exports and provides boilerplate for automating the generation of universal module definitions during the build process.

## Tags

### Programming Languages & Runtimes

- [Universal Module Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/universal-module-definitions.md) — Provides a universal module definition pattern enabling a single file to work across Node.js, AMD, and browsers.
- [Cross-Environment Library Development](https://awesome-repositories.com/f/programming-languages-runtimes/cross-environment-library-development.md) — Establishes a methodology for developing libraries that function across multiple JavaScript module loaders and runtimes.
- [Cross-Environment Module Distribution](https://awesome-repositories.com/f/programming-languages-runtimes/cross-environment-module-distribution.md) — Implements a methodology for distributing libraries that work seamlessly in both Node.js and client-side browsers.
- [Cross-Environment Module Executors](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/javascript-and-web-standard/cross-environment-module-executors.md) — Provides standardized patterns to ensure a single JavaScript file is compatible across multiple execution environments. ([source](https://github.com/umdjs/umd/blob/master/README.md))
- [Module Format Polyfills](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/module-management/module-systems/es-module-integrations/module-format-polyfills.md) — Emulates specific module system interfaces within different environments to ensure cross-runtime compatibility.
- [Module Interface Exports](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/module-management/module-systems/synchronous-module-loaders/module-interface-exports.md) — Uses immediately invoked function expressions to attach modules to the global window object.
- [UMD Generation Tooling](https://awesome-repositories.com/f/programming-languages-runtimes/universal-module-definitions/umd-generation-tooling.md) — Automates the wrapping of JavaScript code into universal module definitions during the build process. ([source](https://github.com/umdjs/umd#readme))

### Development Tools & Productivity

- [Universal Module Wrapping](https://awesome-repositories.com/f/development-tools-productivity/external-module-declarations/runtime-module-declarations/universal-module-wrapping.md) — Ensures JavaScript modules can be loaded in CommonJS, AMD, and browser environments using a standardized wrapper.
- [Module Boilerplate Generators](https://awesome-repositories.com/f/development-tools-productivity/module-boilerplate-generators.md) — Provides boilerplate patterns to automate the wrapping of JavaScript code during the build process.

### Software Engineering & Architecture

- [Module System Detection Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/conditional-execution-gating/module-system-detection-wrappers.md) — Implements runtime logic blocks to detect the active module system and execute the correct loading path.
- [Environment Detection](https://awesome-repositories.com/f/software-engineering-architecture/cross-platform-architectures/environment-detection.md) — Provides logic to identify whether the environment is AMD, CommonJS, or a browser global scope.
- [Module System Adapters](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/infrastructure-runtime-adapters/module-system-adapters.md) — Acts as a bridge enabling modules from different JavaScript module systems to interoperate without modification.
- [Module System Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/module-system-wrappers.md) — Provides a wrapping tool that allows a single JavaScript file to function across multiple different script loaders.
- [AMD-CommonJS Interop Layers](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/infrastructure-runtime-adapters/commonjs-compatibility/amd-commonjs-interop-layers.md) — Enables modules written in AMD style to function within Node.js and other CommonJS runtimes. ([source](https://github.com/umdjs/umd/blob/master/README.md))

### Web Development

- [Cross-Loader Plugin Compatibility](https://awesome-repositories.com/f/web-development/jquery-plugins/cross-loader-plugin-compatibility.md) — Defines jQuery plugins using patterns that maintain compatibility across AMD and browser global environments. ([source](https://github.com/umdjs/umd#readme))
- [Universal Plugin Wrappers](https://awesome-repositories.com/f/web-development/jquery-plugins/universal-plugin-wrappers.md) — Provides a specialized wrapper for jQuery plugins to ensure compatibility across global and modular loading environments.
