By default, writeFile will not create the output directory if it does not exist and, as such, will cause an error to be thrown when it doesn't. This is a nuisance because dist folder are usually not commited to the repository so you either have to create the folder structure and commit it with a .gitignore file, or run a script to create these folders pre-build.
Using mkdirp-promise to create the folder solves the problem. This PR does just that.
By default,
writeFile
will not create the output directory if it does not exist and, as such, will cause an error to be thrown when it doesn't. This is a nuisance because dist folder are usually not commited to the repository so you either have to create the folder structure and commit it with a.gitignore
file, or run a script to create these folders pre-build.Using
mkdirp-promise
to create the folder solves the problem. This PR does just that.