export default function(dir: string, options: any, configuration?: any): Promise