timrwood/moment — pull request #443 by yanivtal (2012-09-23 18:38:04+00:00)
Title: Export moment for require.js

The pull request at https://github.com/timrwood/moment/commit/57ccb0ca3825d090fc911ef0a3acccfa33c2f0a7 added a section to export moment for AMD modules but this doesn't work for require.js. When trying to load moment.js from require, I always get undefined.

I added an additional check to see if require is defined and if so export moment using require's define function (different set of parameters than what must be standard AMD). With this change I can include moment using require.js.