The IDF had intelligence about the locations of many, or all, of the long-range missiles in Gaza - that could reach past Tel Aviv - and took them out.
Here is its image of one of the Fajr-5 launch sites in the middle of a crowded neighborhood:
Here's video of terrorists hiding one:
Here is video of some of the strikes in Gaza City from an Arabic site. You can see enormous fires that indicate the targets were filled with explosives: