How to use the electron-rebuild function in electron-rebuild

To help you get started, we’ve selected a few electron-rebuild examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / xde / gulp / build-tasks.js View on Github external
return async function buildNativeModules() {
      let versionResult = await spawnAsync(electron, ['--version']);
      let electronVersion = /v(\d+\.\d+\.\d+)/.exec(versionResult.stdout)[1];

      logger.info(`Rebuilding native Node modules for Electron ${electronVersion}...`);
      await rebuild(
        path.resolve(paths.app),
        electronVersion,
        /* arch */ undefined,
        /* extraModules */ undefined,
        force
      );
    };
  },
github electron-userland / electron-forge / packages / api / core / src / util / rebuild.ts View on Github external
await asyncOra('Preparing native dependencies', async (rebuildSpinner) => {
    const rebuilder = rebuild({
      ...config,
      buildPath,
      electronVersion,
      arch,
    });
    const { lifecycle } = rebuilder;

    let found = 0;
    let done = 0;

    const redraw = () => {
      rebuildSpinner.text = `Preparing native dependencies: ${done} / ${found}`;
    };

    lifecycle.on('module-found', () => { found += 1; redraw(); });
    lifecycle.on('module-done', () => { done += 1; redraw(); });
github MarshallOfSound / Google-Play-Music-Desktop-Player-UNOFFICIAL- / gulpfile.babel.js View on Github external
    (buildPath, electronVersion, pPlatform, pArch, done) => rebuild(buildPath, electronVersion, pArch).then(() => done()).catch(done),
    (buildPath, electronVersion, pPlatform, pArch, done) => {

electron-rebuild

Electron supporting package to rebuild native node modules against the currently installed electron

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis