this distDir is build_stage/gallery, will change it to `stageDir`.