How do I set up asymptote in Atom?

Which packages are needed to be able to compile .asy files to produce a pdf output? Preferably, I would like to compile asy blocks in .tex files automatically when I build the .tex file.