There is only one problem with them I see.
If you don't no nothing about one or how to make one and are asking how.
You should leave it alone and buy a UL listed supply.
You can get killed burned or hurt bad don't play with mains power it the bottom line.
Transformerless supplies are ok as long as you don't want to repair it or work on it, they're ideal for small confined spaces, no heat wasted, low current,in a double isolated plastic case, like pir security lights.
As this forum is read by novices, it is a good policy to discourage use of these potentially deadly supplies. To do otherwise is at least foolish, and even dangerous.