crossy.io npm module unpacker
Crossy.IO allows you to easily cross compile your NPM packages for multiple operating systems / architectures. Sign up at crossy.io.
Include the following in your package.json
.
{
"scripts": {
"preinstall": "node -e \"try{require('crossyio-unpack/preinstall');}catch(e){}\""
},
"bundledDependencies": [
"crossyio-unpack"
],
"dependencies": {
"crossyio-unpack": "^1.0.0"
},
"crossyio": {
"url": "crossy.io/org-name/package-name"
}
}
When someone installs your package, the preinstall script will check crossy.io
and, if available, download a tarball containing the package dependencies. The tarball will be extracted into your node_modules.
If the pre-compiled version is not available, the normal npm process will continue.
See crossyio-canary as an example npm package.