lighthouse-extension/build-extension.js
/**
 * Copy popup.js to dist folder, inlining the current commit hash along the way.
 * @return {Promise<void>}
 */
Copy popup.js to dist folder, inlining the current commit hash along the way.
@return {Promise}
Copy popup . js to dist folder inlining the current commit hash along the way . @return { Promise }
async function copyPopup() {
  let popupSrc = fs.readFileSync('app/src/popup.js', {encoding: 'utf8'});
  popupSrc = popupSrc.replace(/__COMMITHASH__/g, bundleBuilder.COMMIT_HASH);
  await makeDir(`${distDir}/scripts`);
  fs.writeFileSync(`${distDir}/scripts/popup.js`, popupSrc);
}
async function copyPopup ( ) { let popupSrc = fs . readFileSync ( 'app/src/popup.js' , { encoding : 'utf8' } ) ; popupSrc = popupSrc . replace ( / __COMMITHASH__ / g , bundleBuilder . COMMIT_HASH ) ; await makeDir ( ` ${ distDir } ` ) ; fs . writeFileSync ( ` ${ distDir } ` , popupSrc ) ; }
Copy popup.js to dist folder, inlining the current commit hash along the way.
Copy popup . js to dist folder inlining the current commit hash along the way .