function buildApp(src, dest, options, callback) {
  const appArgs = selectAppArgs(options);
  copy(src, dest, (error) => {
    if (error) {
      callback(`Error Copying temporary directory: ${error}`);
      return;
    }

    fs.writeFileSync(path.join(dest, '/nativefier.json'), JSON.stringify(appArgs));

    maybeCopyScripts(options.inject, dest)
      .catch((error) => {
        console.warn(error);
      })
      .then(() => {
        changeAppPackageJsonName(dest, appArgs.name, appArgs.targetUrl);
        callback();
      });
  });
}
/**
 * Creates a temporary directory and copies the './app folder' inside,
 * and adds a text file with the configuration for the single page app.
 *
 * @param {string} src
 * @param {string} dest
 * @param {{}} options
 * @param callback
 */
Creates a temporary directory and copies the './app folder' inside,
and adds a text file with the configuration for the single page app.


Creates a temporary directory and copies the ' . / app folder ' inside and adds a text file with the configuration for the single page app .
function buildApp(src, dest, options, callback) {
  const appArgs = selectAppArgs(options);
  copy(src, dest, (error) => {
    if (error) {
      callback(`Error Copying temporary directory: ${error}`);
      return;
    }
    fs.writeFileSync(path.join(dest, '/nativefier.json'), JSON.stringify(appArgs));
    maybeCopyScripts(options.inject, dest)
      .catch((error) => {
        console.warn(error);
      })
      .then(() => {
        changeAppPackageJsonName(dest, appArgs.name, appArgs.targetUrl);
        callback();
      });
  });
}
function buildApp ( src , dest , options , callback ) { const appArgs = selectAppArgs ( options ) ; copy ( src , dest , ( error ) => { if ( error ) { callback ( ` ${ error } ` ) ; return ; } fs . writeFileSync ( path . join ( dest , '/nativefier.json' ) , JSON . stringify ( appArgs ) ) ; maybeCopyScripts ( options . inject , dest ) . catch ( ( error ) => { console . warn ( error ) ; } ) . then ( ( ) => { changeAppPackageJsonName ( dest , appArgs . name , appArgs . targetUrl ) ; callback ( ) ; } ) ; } ) ; }
Creates a temporary directory and copies the './app folder' inside,
 and adds a text file with the configuration for the single page app.
Creates a temporary directory and copies the ' . / app folder ' inside and adds a text file with the configuration for the single page app .