How to use the electron-rebuild.rebuildNativeModules 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 enlight / electron-inspector / src / rebuild.ts View on Github external
export async function rebuild(
  executablePath: string, version: string, arch: string
): Promise {
  let modulesDir = path.join(__dirname, '../node_modules');
  console.log(`Rebuilding native node-inspector modules for Electron ${version}`);
  await installNodeHeaders(version, null, null, arch);
  console.log(`Rebuilding ${modulesDir}/v8-profiler`);
  await rebuildNativeModules(version, modulesDir, 'v8-profiler', null, arch);
  // `node-inspector` will be launched in a "run as node" Electron process,
  // so `node-pre-gyp` will be looking for a `node-vXX-platform-arch` directory
  await preGypFixRun(path.join(modulesDir, 'v8-profiler'), true, executablePath);
  console.log(`Rebuilding ${modulesDir}/v8-debug`);
  await rebuildNativeModules(version, modulesDir, 'v8-debug', null, arch);
  await preGypFixRun(path.join(modulesDir, 'v8-debug'), true, executablePath);
  console.log(`Done.`);
}
github enlight / electron-inspector / src / rebuild.ts View on Github external
export async function rebuild(
  executablePath: string, version: string, arch: string
): Promise {
  let modulesDir = path.join(__dirname, '../node_modules');
  console.log(`Rebuilding native node-inspector modules for Electron ${version}`);
  await installNodeHeaders(version, null, null, arch);
  console.log(`Rebuilding ${modulesDir}/v8-profiler`);
  await rebuildNativeModules(version, modulesDir, 'v8-profiler', null, arch);
  // `node-inspector` will be launched in a "run as node" Electron process,
  // so `node-pre-gyp` will be looking for a `node-vXX-platform-arch` directory
  await preGypFixRun(path.join(modulesDir, 'v8-profiler'), true, executablePath);
  console.log(`Rebuilding ${modulesDir}/v8-debug`);
  await rebuildNativeModules(version, modulesDir, 'v8-debug', null, arch);
  await preGypFixRun(path.join(modulesDir, 'v8-debug'), true, executablePath);
  console.log(`Done.`);
}
github microsoft / pxt / electron / dev_tools / rebuildNative.js View on Github external
.then(() => {
                    console.log(`    ${currentFolder}`);
                    return electronRebuild.rebuildNativeModules(electronVersion, currentFolder);
                })
                .then(() => electronRebuild.preGypFixRun(currentFolder, true, electron))
github ubergrape / grape-electron / tasks / rebuild_native_modules.js View on Github external
.then(() =>
        rebuild.rebuildNativeModules(
          electronPackage.version,
          pathToElectronNativeModules,
        ),
      )
github chrisenytc / ubauth / tasks / rebuild_native_modules.js View on Github external
.then(function () {
        return rebuild.rebuildNativeModules(electronPackage.version, pathToElectronNativeModules);
    });
})
github paulsutherland / Polyonic / tasks / rebuild_native_modules.js View on Github external
.then(function () {
      return rebuild.rebuildNativeModules(electronPackage.version, pathToElectronNativeModules)
    })
})
github beakerbrowser / beaker / tasks / rebuild_native_modules.js View on Github external
.then(function () {
    return rebuild.rebuildNativeModules(electronPackage.version, pathToElectronNativeModules);
  });
})

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

53 / 100
Full package analysis