code: function wrapAMD(content, file, conf, shim) {
  
      shim = shim || {};
  
      var moduleId = shim.id || getModuleId('', file, conf);
  
      var prefix = 'define(\'' + moduleId + '\', function(require, exports, module) {\n';
      var affix = '\n});';
  
      if (shim.deps) {
          shim.deps.forEach(function(dep) {
              prefix += 'require(\'' + dep + '\');\n';
          });
      }
  
      if (shim.init) {
          affix = 'modules.exports = ('+shim.init+')('+(function() {
              var deps = [];
  
              if (shim.deps) {
                  shim.deps.forEach(function(dep) {
                      deps.push('require(\''+ dep +'\')');
                  });
              }
  
              return deps.join(', ');
          })()+');\n' + affix;
      } else if (shim.exports) {
          affix = '\nmodule.exports = ' + shim.exports + ';\n' + affix;
      }
  
      return prefix + content + affix;
  }
docs: 包装成 amd 格式。