How does package.json handle compiler semantics, linker, library, modules, architectures, incremental compilation, cross-compilation, dependencies to Objective-C and C libraries, ... ?
There are configuration variables for pretty much everything you listed. There are also variables for preinstall scripts, postinstall scripts, removal scripts, upgrade scripts, etc. defined in the package.json spec.