Custom AMD loading with requirejs-dplugins
Requirejs-dplugins provides you various AMD plugins to load CSS files, i18n bundles, and more.
Installation
The easiest way to get requirejs-dplugins is to use Bower to install
the latest release.
$ bower install requirejs-dplugins
Alternatively you can manually download a release from
requirejs-dplugins Github page.
List of plugins
- css
- Load and wait for a css file. CSS loaded with this plugin can be overwritten by user-defined style sheet, using <link> or <style> tag.
- i18n
- Provides an API to handle string translation and create bundles for the most frequent locales.
- has
- Provides conditional module loading and an extensible API to manage feature detection.
- jquery
- Loads jQuery modules from AMD source code or from jQuery globals if available.