How to use prebuild-install - 2 common examples

To help you get started, we’ve selected a few prebuild-install 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 nstepien / iltorb / scripts / install.js View on Github external
log.warn('install', 'prebuilt binaries may be out of date!')
} else if (!npm && /node_modules/.test(process.cwd())) {
  // This is a NOOP conditional that is used to handle certain situations where
  // the PM may build from source instead of attempting to download the binary.
} else if (!(typeof pkg._from === 'string')) {
  log.info('install', 'installing standalone, skipping download.')
  process.exit(1)
} else if (pkg._from.length > 4 && pkg._from.substr(0, 4) === 'git+') {
  log.info('install', 'installing from git repository, skipping download.')
  process.exit(1)
} else if (opts.compile === true || opts.prebuild === false) {
  log.info('install', '--build-from-source specified, not attempting download.')
  process.exit(1)
}

prebuildDL(prebuildUtil.getDownloadUrl(opts), opts, function(err) {
  if (err) {
    log.warn('install', err.message);
    process.exit(1);
  }

  log.info('install', 'Successfully installed iltorb binary!');
});
github elm-tooling / elm-language-server / src / util / rebuilder.ts View on Github external
(accessErr: NodeJS.ErrnoException | null) => {
        if (!accessErr) {
          return res();
        }
        if (accessErr.code !== "ENOENT") {
          return rej(accessErr);
        }

        prebuildInstall.download(url, { pkg, path: pkgRoot }, (err: Error) => {
          err ? rej(err) : res();
        });
      },
    );

prebuild-install

A command line tool to easily install prebuilt binaries for multiple version of node/iojs on a specific platform

MIT
Latest version published 10 months ago

Package Health Score

83 / 100
Full package analysis