When designing a JS library should I make it RequireJS/AMD compatible or not?
If I'm making a JavaScript library for general use, how should I handle RequireJS support? As far as I can tell, making your code compliant with RequireJS more or less makes it impossible to use without RequireJS. So why would I do that? How do people without Require use this code? Is there a way to support both without forking / branching? Should I provide the shim code? Do I understand this correctly? explunit If you're only dealing with browser (not node.js), it's only a handful of lines to make the library support both AMD and non-AMD. For example, here is the file from jQuery that does it