code: function toUrl(source, baseId) {
          // 分离 模块标识 和 .extension
          var extReg = /(\.[a-z0-9]+)$/i;
          var queryReg = /(\?[^#]*)$/;
          var extname = '';
          var id = source;
          var query = '';
  
          if (queryReg.test(source)) {
              query = RegExp.$1;
              source = source.replace(queryReg, '');
          }
  
          if (extReg.test(source)) {
              extname = RegExp.$1;
              id = source.replace(extReg, '');
          }
  
          if (baseId != null) {
              id = normalize(id, baseId);
          }
  
          var url = id;
  
          // paths处理和匹配
          var isPathMap;
          indexRetrieve(id, pathsIndex, function (value, key) {
              url = url.replace(key, value);
              isPathMap = 1;
          });
  
          // packages处理和匹配
          if (!isPathMap) {
              indexRetrieve(id, packagesIndex, function (value, key, item) {
                  url = url.replace(item.name, item.location);
              });
          }
  
          // 相对路径时，附加baseUrl
          if (!/^([a-z]{2,10}:\/)?\//i.test(url)) {
              url = requireConf.baseUrl + url;
          }
  
          // 附加 .extension 和 query
          url += extname + query;
  
          // urlArgs处理和匹配
          indexRetrieve(id, urlArgsIndex, function (value) {
              url += (url.indexOf('?') > 0 ? '&' : '?') + value;
          });
  
          return url;
      }
docs: 将`模块标识+'.extension'`形式的字符串转换成相对的url
  
  @inner
  @param {string} source 源字符串
  @param {string} baseId 当前module id
  @return {string} url