utils/host-utils.js
function getScripts(chunks) {
  let scripts = [];

  // Used when skipping the build, short-circuit to return metadata
  if (chunks.metadata) {
    return chunks.metadata;
  }

  sorter.dependency(chunks).forEach((chunk) => {
    scripts.push({
      name: chunk.files[0]
    });
  });

  return scripts;
}
function getScripts(chunks) {
  let scripts = [];

  // Used when skipping the build, short-circuit to return metadata
  if (chunks.metadata) {
    return chunks.metadata;
  }

  sorter.dependency(chunks).forEach((chunk) => {
    scripts.push({
      name: chunk.files[0]
    });
  });

  return scripts;
}
function getScripts ( chunks ) { let scripts = [ ] ; // Used when skipping the build, short-circuit to return metadata if ( chunks . metadata ) { return chunks . metadata ; } sorter . dependency ( chunks ) . forEach ( ( chunk ) => { scripts . push ( { name : chunk . files [ 0 ] } ) ; } ) ; return scripts ; }
Sorts chunks into array of scripts.
@param {Array} chunks
Sorts chunks into array of scripts .