docs: function removeRequire(filepath, source, moduleBase) {
  
          try {
              return source.replace(/\brequire\s*\(\s*("|')([\s\S]*?)\1\s*\)/g, function (match, sign, moduleName) {
  
                  var originalName = moduleName;
  
                  if (/^[.]{1,2}\//.test(moduleName)) {
                      moduleName = PathModule.resolve(PathModule.dirname(filepath) + PathModule.sep + moduleName);
                  } else if (idMapping.hasOwnProperty(moduleName)) {
                      return depsPoolName + '.r(' + idMapping[moduleName] + ')';
                  } else {
                      moduleName = PathModule.resolve(moduleBase + moduleName);
                  }
  
                  if (PathModule.extname(moduleName) === "") {
                      moduleName += ".js";
                  }
  
                  if (moduleMapping.hasOwnProperty(moduleName)) {
                      return depsPoolName + ".r(" + moduleMapping[moduleName] + ")";
                  }
  
                  throw new ModuleNotfoundError(originalName);
  
              });
          } catch (e) {
              if (e.name === "ModuleNotfoundError") {
                  grunt.fatal('Module [' + e.message + '] not found, in file: ' + filepath);
              }
              throw e;
          }
  
      }