code: function collectPages( flows ) {
        const followPageOnce = promiseOnce( followPageRecursively );
        const followFlowToPages = followEntryRefs( 'pages', followPageOnce );
        const followPageToPages = followFlowToPages;
  
        return Promise.all( flows.map( followFlowToPages ) )
           .then( flatten )
           .then( dedupe );
  
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
  
        /**
         * Collect meta information about the given page, and about all pages reachable from it, recursively.
         * Skip collection if the page has already been processed (returning an empty result array).
         *
         * @private
         * @param {String} pageRef the page reference (relative to `paths.pages`) to follow
         * @return {Promise<Array>}
         *    a promise for an array of page-meta objects for this page, including the page itself
         */
        function followPageRecursively( pageRef ) {
           return followPage( pageRef )
              .then( pages => Promise.all(
                 [ Promise.resolve( pages ) ].concat( pages.map( followPageToPages ) )
              ) )
              .then( flatten );
        }
     }
docs: //////////////////////////////////////////////////////////////////////////////////////////////////////// 
  Asynchronously collect all pages that are reachable from the given list of flows.
  
  Example:
  
  collector.collectPages( flows )
  .then( pages => {
  assert( Array.isArray( pages ) );
  } );
  // => [ {
  //       refs: [ 'page' ],
  //       name: 'page',
  //       path: 'path/to/page.json',
  //       pages: [ ... ],
  //       layouts: [ ... ],
  //       widgets: [ ... ]
  //    }, ... ]
  
  @memberOf ArtifactCollector
  @param {Array<String>} flows
  a list of flow artifacts as returned by {@link ArtifactCollector#collectFlows}
  @return {Promise<Array>}
  a promise for a combined array of page meta information for these flows