use closure fns to compile core and output all deps to the correct location