-
Notifications
You must be signed in to change notification settings - Fork 10
Description
How it works
Vagrunt up
The vagrant up command installs the download manager axel and the version control client git on top of a prepared vagrant box (ubuntu/trusty64). Further it downloads and extracts the mipsel-toolchain (276 MB) (Toolchain for cross-compiling which uses uClibc for RISC processors)
Bash Script compile.sh
This script first logs into the VM and causes installing NVM and NodeJS 4.2.1 if missing. Further node-gyp installs node development header files for the corresponding NodeJS version.
Now pre-gypify compiles pre-gyp into non-gyp modules. The package to compile now is installed without pre-install and pre-publish scripts (npm install --ignore-scripts). Afterwards node-pre-gyp build package creates the compiled binary module for the Tessel 2 which is using a RISC Processor Mediatek MT7620n.
Finally it syncs the compiler output via ssh to your current ./out
Binary Server
- The
/lib/server.jsis starting the/lib/package-listener.jsand a/lib/web-server(http://0.0.0.0:3000) which shows package names from the local../knexfiledatabase. - The
/lib/package-listener.jsis is watching (listenForChanges()) https://skimdb.npmjs.com/registry/ for changes by callingcheck-for-gyp. It uses concurrent-couch-follower to ensure everypackages.jsonwith abinding.gypis completely checked (in parallel for up to 20 docs at the moment) /lib/check-for-gyp.jsreturns a promise which checks whether abinding.gypexists in the doc (package.json)/lib/package-url.jsis fetching and parsing thepackages.jsonfrom npmjs.comdb.jssets up the local kexfile.js