How to use the napi-build-utils.logMissingNapiVersions function in napi-build-utils

To help you get started, we’ve selected a few napi-build-utils 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 prebuild / prebuild / bin.js View on Github external
if (rc.help) {
  console.error(fs.readFileSync(path.join(__dirname, 'help.txt'), 'utf-8'))
  process.exit(0)
}

log.info('begin', 'Prebuild version', prebuildVersion)

// nvm! do not mess with headers? kkthx!
delete process.env.NVM_IOJS_ORG_MIRROR
delete process.env.NVM_NODEJS_ORG_MIRROR

var buildLog = log.info.bind(log, 'build')
var opts = Object.assign({}, rc, { pkg: pkg, log: log, buildLog: buildLog, argv: process.argv })

if (napi.isNapiRuntime(rc.runtime)) napi.logMissingNapiVersions(rc.target, rc.prebuild, log)

if (opts['upload-all']) {
  fs.readdir('prebuilds', function (err, pbFiles) {
    if (err) return onbuilderror(err)
    uploadFiles(pbFiles.map(function (file) { return 'prebuilds/' + file }))
  })
} else {
  var files = []
  eachSeries(opts.prebuild, function (target, next) {
    prebuild(opts, target.target, target.runtime, function (err, tarGz) {
      if (err) return next(err)
      files.push(tarGz)
      next()
    })
  }, function (err) {
    if (err) return onbuilderror(err)

napi-build-utils

A set of utilities to assist developers of tools that build N-API native add-ons

MIT
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis