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

Don't skip building when cross-installing for win32 #7

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

pimterry
Copy link
Contributor

npm_config_platform=win32 can be used with prebuild-install to download binaries for win32 when running npm 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.

@vweevers
Copy link
Owner

npm_config_platform=win32 can be used with prebuild-install to download binaries for win32 when running npm 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.

@pimterry
Copy link
Contributor Author

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...

@pimterry pimterry force-pushed the allow-crosscompile branch from 79c87d2 to 552c45b Compare June 11, 2019 14:58
@vweevers vweevers merged commit 66fc339 into vweevers:master Jun 11, 2019
@pimterry pimterry deleted the allow-crosscompile branch June 11, 2019 18:26
@vweevers
Copy link
Owner

3.0.1

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.

2 participants