fix dir.dist is undefined in templates/gulpfile