umdjs / umd

UMD (Universal Module Definition) patterns for JavaScript modules that work everywhere.
MIT License
7.42k stars 423 forks source link

jQuery compatible (but not required) + AMD + CommonJS? #136

Open alvarotrigo opened 6 years ago

alvarotrigo commented 6 years ago

I'm a bit confused with so many different UMD templates.

What if I want to build a javascript library, which can be used by itself, or together with a jQuery adaptor, and I also want it to be compatible with AMD and commonJS?

In that case, which of the UMD templates is the appropriate one?

HariharanUmapathi commented 9 months ago

@alvarotrigo your required template format is jquery template you can handle additionaly if jquery is not available you can attach your code to the window level https://github.com/umdjs/umd/blob/master/templates/jqueryPlugin.js