I know the youtuber SethBling did that, but that takes some hacking with mcedit filters.
I don't know exactly where to begin with that to be honest.
SethBling used Mcedit/world painter. As PrimedTNT is an Entity, a spawner, in theory, can spawn TNT. It shouldn't be too hard to code, but currently, you must use a world editor.
You can also use the /xp command, which is built into the game.