emit end in map and pre, listen for finish in pre to compile