accesing viewer instance within SandCastle app

In a regular Cesium app both Cesium and viewer instance are top level objects. In SandCastle Cesium is also a top level object, but the viewer instance is buried somewhere. Anyone know how to access it from the outside of the SandCastle app? I used to first declare viewer outside of SandCastle then initialize it within SandCastle, but I was hoping to use a more elegant method.