improved build system to automatically install npm dependencies