keithamus / hbs-cli

A CLI for handlebars
43 stars 26 forks source link

feat: use mkdirp to create folder before outputing #53

Closed rmobis closed 5 years ago

rmobis commented 5 years ago

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.

rmobis commented 5 years ago

Welp, that wasn't quite smart. While mkdirp does support v0.12, mkdirp-promise doesn`t...

keithamus commented 5 years ago

👍 awesome work thanks @rmobis

keithamus commented 5 years ago

1.3.0 has been released 🎉