danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

aglio ... -o out/index.html doesn't create a folder #281

Open lludol opened 8 years ago

lludol commented 8 years ago

Hello,

Is it possible to tell aglio to create a folder with the "-o" option ?

For example, if I run aglio like this:

aglio -i doc.apib -o out/index.html

I will have this error if the folder out doesn't exist:

>> { Error: ENOENT: no such file or directory, open 'out/index.html'
    at Error (native)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'out/index.html' }

I know it's because aglio only check if it can create the file instead of creating the folder if he can't.

Can you do something for that ?