Check your battery, my jeep did the same thing and all i did was replace the battery and WALAH! also there is a juse that goes to the jeep, i think its like a 100amp fuse that goes to the alternator that sometimes can partially be blown, i had to replace mine too. hope this helps.
At first my lights outside my car and the dash lights were dimming out then i would put on my high beams the interior lights would go out then go back on after high beams were off and the voltage gauge would just drop to nothing and no battery after jeep would shut off so i replaced the alternater everything worked great again now like 2 weeks later the voltage guage is at zero and jeep wont stay running belts squeeling when i hit the gas and the voltage guage some times reads around 10amps then like 5 mins later it drops to zero and jeep shuts off. IF i keep the engine reved it stays on but then sometimes it stays on by it self and guage stays up between 10 to 14amps then till i drive it to the stop sign if shuts off then starts right back up with the gas petal down.?? stumped not sure wat else i should do.