docs: function combineRequires( output, options ) {
    // The  `cache` is  used  to prevent  dependencies  cycling. When  a
    // module has been  processed, we add its name in  the `cache`. Next
    // time we find a module already in `cache` we will not process it.
    var cache = {},
        // dictionary  of directly needed modules. The key is the module's name, the value is always `1`.
        modules = output.require || {},
        // List of modules' names we have to process.
        fringe = [],
        // Name of the current module.
        moduleName,
        // Style Sheet combined content.
        css = '',
        // Source file of the JS or CSS for the current module.
        src,
        // Dependencies of the current module's javascript.
        dependencies,
        // Map of Javascript sources. No compression.
        jsFiles = {},
        // Map of Stylesheet sources. No compression.
        cssFiles = {},
        // Iterator used for comments visual improvements.
        i;
  
    if ( !Array.isArray( output.modules ) ) output.modules = [];
  
    // Fill the cache with all dynamic modules.
    for ( moduleName in output.dynamicModules ) {
      cache[ moduleName ] = 1;
    }
  
    // Always include the module `$` which was generated automatically.
    modules[ 'mod/$' ] = 1;
    // Fill the fringe with `modules`.
    for ( moduleName in modules ) {
      fringe.push( moduleName );
    }
  
    // Process all required modules by popping the next module's name from the `fringe`.
    while ( fringe.length > 0 ) {
      moduleName = fringe.pop(); // Pop the current module from the `fringe`.
      cache[ moduleName ] = 1; // Don't process this module more than once.
      if ( moduleName.substr( 0, 4 ) == 'cls/' ) {
        // We have to include `tfw3.js` for backward compatibility.
        output.innerJS[ Template.file( 'tfw3.js' ).out ] = 1;
      } else if ( moduleName.substr( 0, 4 ) == 'mod/' ) {
        // Remember all the modules used in this HTML page.
        if ( output.modules.indexOf( moduleName ) < 0 ) {
          output.modules.push( moduleName );
        }
      }
      //============
      // Javascript
      //------------
      // Compile (if  not uptodate) the  JS of the current  module and
      // return the source file.
      src = CompilerJS.compile( Project, moduleName + ".js", options, output );
      const moduleNameWithoutSlashes = Util.replaceSlashesWithDots( moduleName );
      if ( !jsFiles[ moduleNameWithoutSlashes ] ) {
        jsFiles[ moduleNameWithoutSlashes ] = {
          src: src.tag( 'src' ),
          zip: src.tag( 'zip' ),
          map: src.tag( 'map' ),
          dep: src.tag( "dependencies" )
        };
      }
      // Adding dependencies to the `fringe`.
      dependencies = src.tag( "dependencies" );
      if ( Array.isArray( dependencies ) ) {
        dependencies.forEach( function ( dep ) {
          if ( !cache[ dep ] ) {
            fringe.push( dep );
          }
        } );
      }
      //==============
      // Style Sheets
      //--------------
      src = compileCSS( moduleName + ".css", options );
      if ( src ) {
        if ( !cssFiles[ moduleNameWithoutSlashes ] ) {
          cssFiles[ moduleNameWithoutSlashes ] = {
            src: src.tag( 'src' ),
            zip: src.tag( 'zip' )
          };
        }
      }
    }
  
    return {
      js: jsFiles,
      css: cssFiles
    };
  }