code: function getModulesToCompile(jsModules, cssRenamingFile) {
    var modulesWithCompiledJs = {};
    jsModules.forEach(function(jsModule) {
      if (jsModule.compiledInputFiles.length > 0) {
        modulesWithCompiledJs[jsModule.name] = true;
      }
    });
  
    // If no modules have JS to compile, then there is nothing to do.
    if (underscore.keys(modulesWithCompiledJs).length == 0) {
      return [];
    }
  
    // If there are CSS classes to rename, prepend them to the base module.
    if (cssRenamingFile) {
      jsModules[0].compiledInputFiles.unshift(cssRenamingFile);
      modulesWithCompiledJs[jsModules[0].name] = true;
    }
  
    // Filter out any modules with no JS to compile.
    var modulesToCompile = [];
  
    jsModules.forEach(function(jsModule) {
      if (modulesWithCompiledJs[jsModule.name]) {
        var filteredModule = graphUtil.deepClone(jsModule);
        filteredModule.alwaysLoadedAfterModules =
            filteredModule.alwaysLoadedAfterModules.filter(function(moduleName) {
              return !!modulesWithCompiledJs[moduleName];
            });
        modulesToCompile.push(filteredModule);
      }
    });
  
    return modulesToCompile;
  }
docs: Filters out modules with no JS to compile and prepends cssRenamingFile to
  the base module (so long as there are any modules to compile).
  @param {!Array.<!{name: string, compiledInputFiles: !Array.<string>,
  dontCompileInputFiles: !Array.<string>,
  alwaysLoadedAfterModules: !Array.<string>}>} jsModules
  @param {?string} cssRenamingFile
  @return {!Array.<!{name: string, compiledInputFiles: !Array.<string>,
  dontCompileInputFiles: !Array.<string>,
  alwaysLoadedAfterModules: !Array.<string>}>}