Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip build on platforms other than Windows #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vweevers
Copy link

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.

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.
@lotuswood
Copy link

@sergiou87 This solution looks sleek, though I didn't verify. Would you consider to approve it for a rc build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants