src/main/javascript/Installer/buildStrategies.js
function customStrategyInPlace(projectDir, builder, cb)
{
  const installerDir = path.resolve(projectDir, "node_modules", "@deskpro", INSTALLER_PACKAGE_NAME);
  const customInstallerTarget = path.resolve(installerDir, "src", "settings");
  shelljs.rm('-rf', customInstallerTarget);

  const copyOptions = { overwrite: true, expand: true, dot: true };

  function onCustomInstallerFilesReady (err) {
    builder.buildFromSource(installerDir, projectDir);
    cb();
  }

  let customInstallerSrc = path.resolve(projectDir, "src", "installer");
  customInstallerSrc = fs.realpathSync(customInstallerSrc);

  copy(customInstallerSrc, customInstallerTarget, copyOptions, onCustomInstallerFilesReady);
}
function customStrategyInPlace(projectDir, builder, cb)
{
  const installerDir = path.resolve(projectDir, "node_modules", "@deskpro", INSTALLER_PACKAGE_NAME);
  const customInstallerTarget = path.resolve(installerDir, "src", "settings");
  shelljs.rm('-rf', customInstallerTarget);

  const copyOptions = { overwrite: true, expand: true, dot: true };

  function onCustomInstallerFilesReady (err) {
    builder.buildFromSource(installerDir, projectDir);
    cb();
  }

  let customInstallerSrc = path.resolve(projectDir, "src", "installer");
  customInstallerSrc = fs.realpathSync(customInstallerSrc);

  copy(customInstallerSrc, customInstallerTarget, copyOptions, onCustomInstallerFilesReady);
}
function customStrategyInPlace ( projectDir , builder , cb ) { const installerDir = path . resolve ( projectDir , "node_modules" , "@deskpro" , INSTALLER_PACKAGE_NAME ) ; const customInstallerTarget = path . resolve ( installerDir , "src" , "settings" ) ; shelljs . rm ( '-rf' , customInstallerTarget ) ; const copyOptions = { overwrite : true , expand : true , dot : true } ; function onCustomInstallerFilesReady ( err ) { builder . buildFromSource ( installerDir , projectDir ) ; cb ( ) ; } let customInstallerSrc = path . resolve ( projectDir , "src" , "installer" ) ; customInstallerSrc = fs . realpathSync ( customInstallerSrc ) ; copy ( customInstallerSrc , customInstallerTarget , copyOptions , onCustomInstallerFilesReady ) ; }
Builds the installer in its own dist folder, useful in dev mode because it does not copy all 4k packages

@param {String} projectDir
@param {InstallerBuilder} builder
@param {Function} cb
Builds the installer in its own dist folder useful in dev mode because it does not copy all 4k packages