registry-js
registry-js copied to clipboard
Skip build on platforms other than Windows
Necessary when dependents are cross-platform. The alternatives are setting "os" in package.json
(which only works for yarn,
not npm), using optionalDependencies
in dependents (which would unfortunately ignore legit build failures), or building a dummy native addon (which is the current approach but it requires users to have an otherwise unnecessary build toolchain).
This simple solution works for both yarn and npm. Also accounts for cross-compiling scenarios (when process.platform
does not match the target platform) by checking env.npm_config_platform
.
@sergiou87 This solution looks sleek, though I didn't verify. Would you consider to approve it for a rc build?