There is a similar question in ONLY, I put some snippets of the translated response, I find it very difficult but if by chance the link goes offline at least we have to be guided by this answer, I hope it helps.
Requirejs implements the AMD API (source)
Commonjs is a way to define the modules with the help of an object exports, which defines the contents of the module.
// someModule.js
exports.doSomething = function() { return "foo"; };
//otherModule.js
var someModule = require('someModule'); // in the vein of node
exports.doSomethingElse = function() { return someModule.doSomething() + "bar"; }
Commonjs specifies that you need to have a function to fetch the dependencies, the variable exports to export module content and some module identifier that is used to require the dependencies. Commonjs has several implementations, for example Node.js
Requirejs implements AMD, which is designed to suit the browser, apparently AMD started as a Commonjs Transport format offspin and evolved into its own module definition API. Hence the similarities between the two. The novelty in AMD is the define-function that allows the module to declare its dependencies before it is loaded. For example, the definition could be:
define('module/id/string', ['module', 'dependency', 'array'],
function(module, factory function) {
return ModuleContents;
});
So Commonjs and AMD are Javascript API modules that have different implementations, but both come from the same origins. AMD is best suited for the browser because it supports asynchronous loading of module dependencies. Requirejs is an implementation of AMD, while at the same time trying to maintain the spirit of Commonjs (primarily in module identifiers). To further confuse, Requirejs, being an AMD implementation, offers a Commonjs enclosure so Commonjs modules can almost be directly imported for use with Requirejs.
SOURCE
I think there are already some answers about this here. It would be interesting to include Harmony Modules maybe.
– Sergio
Related question (or at least my answer there is related!): http://answall.com/questions/17343/an%C3%a1lise-e-projeto-em-javascript
– bfavaretto