Closed pimterry closed 5 years ago
npm_config_platform=win32
can be used with prebuild-install to download binaries for win32 when runningnpm install
on Linux, allowing for cross-platform installs.
That sounds.. exotic 😄
I think I'm good with this PR but busy atm so will review later.
That sounds.. exotic smile
It is a bit. I'm working on an oclif CLI, and the build process is designed to run on one Linux or OSX machine, and to build all target platforms there in one go.
That works perfectly well for vanilla JS codebases, and automatically bundles the right node binary for each platform's build so it runs out of the box everywhere, but if you need native modules per-platform too then the process gets a little more complicated...
3.0.1
npm_config_platform=win32
can be used with prebuild-install to download binaries for win32 when runningnpm install
on Linux, allowing for cross-platform installs.This works fine with other similar packages such as registry-js, but doesn't work with this package, because
skip.js
assumes that no install step is required at all in this case. This PR ensures that if this env var is set, it overrides the current platform, so on win32 the prebuild step does indeed get run.