async function buildExtension(browser) {
  const targetBrowser = browser === 'firefox' ? 'firefox-desktop' : 'chromium';
  const browserOutDir = `${working_directory}/build/FastForward.${browser}`;
  const browserSrcDir = `${working_directory}/platform_spec/${browser}`;
  const manfistFile = `${browserSrcDir}/manifest.json`;
  await utils.copyArray([manfistFile], browserOutDir);
  fs.writeFileSync(
    `${browserOutDir}/manifest.json`,
    JSON.stringify(
      Object.assign(JSON.parse(fs.readFileSync(manfistFile, 'utf8')), {
        version: packageVersion,
      }),
      null,
      4 //pretty print
    )
  );
  await utils.convertRulesToDNRRulesets(
    `${browserOutDir}/rules.json`,
    `${browserOutDir}/ip_logger_blocker.json`,
    `${browserOutDir}/tracker_bypass.json`
  );

  await webExt.cmd.build(
    {
      sourceDir: browserOutDir,
      artifactsDir: `${distribution}`,
      overwriteDest: true,
      browser: targetBrowser,
    },
    { shouldExitProgram: false }
  );
  fs.renameSync(
    `${distribution}/fastforward-${packageVersion}.zip`,
    `${distribution}/FastForward_${browser}_${packageVersion}.zip`
  );
}
This is a general build process runner,
Usage: node scripts/build.js {firefox|chromium|all} {none|nover|ver}
{firefox|chromium| all} select weither to build for firefox or chromium
{nover|ver}      nover = Creates a package without version number
                 ver   = Creates a package with version number as specified in version.txt