added pre-build process for conditional schema
using async forEach instead lodash
commented