Simple Wrapping of CommonJS to AMD
All this module does is wrap your CommonJS modules into the simplified CommonJS wrapper format, i.e.:
;
It takes in a string and gives back a string:
var amdWrap = ; // wrap define around stringvar wrapped = ; // wrap define around the string from filevar wrapThis = ; // wrap define and moduleNamevar wrapped = ; // wrap define with moduleName and requiresvar wrapped = ;
Line numbers will line up, although the first column will be shifted by
"define (function (require, exports, module) {".length
characters.
See also: amd-wrap-legacy, which has a few more affordances for use when transitioning a larger codebase from CommonJS to AMD.