A fire was discovered in skid-steer loader engine compartment and was put out in 3-4 minutes. It re-ignited twice immediately and was totally extinguished within 5 -6 minutes. Due to smoke and CO(34ppm), foreman called a mine evac. It was determined to be electrically caused.