rewrite build script to node + add spawn module