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

"How it works" Chapter 4 README.md #20

Open
Student007 opened this issue Apr 12, 2016 · 1 comment
Open

"How it works" Chapter 4 README.md #20

Student007 opened this issue Apr 12, 2016 · 1 comment

Comments

@Student007
Copy link
Member

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.js and a /lib/web-server (http://0.0.0.0:3000) which shows package names from the local ../knexfile database.
  • The /lib/package-listener.js is is watching (listenForChanges()) https://skimdb.npmjs.com/registry/ for changes by calling check-for-gyp. It uses concurrent-couch-follower to ensure every packages.json with a binding.gyp is completely checked (in parallel for up to 20 docs at the moment)
  • /lib/check-for-gyp.js returns a promise which checks whether a binding.gyp exists in the doc (package.json)
  • /lib/package-url.js is fetching and parsing the packages.json from npmjs.com
  • db.js sets up the local kexfile.js
@Student007
Copy link
Member Author

@reconbot is the /lib/package-builder.js replaced by content/calling of compile.sh or a rework ?
My current understanding is, you call t2-identify.js packageName and than things happen like described above.

@Student007 Student007 mentioned this issue Apr 12, 2016
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant