microsoft / dts-gen

dts-gen creates starter TypeScript definition files for any module or library.
MIT License
2.43k stars 101 forks source link

fix: create typings folder when it's missing #109

Open Hotell opened 6 years ago

Hotell commented 6 years ago

Current behaviour:

Project structure:

- types/
  |- one/
  |- two/

When we wanna add new definitions:

npx dts-gen --dt --template module --name webpack-config-utils

we'll get following error, because webpack-config-utils folder doesn't exists:

Unexpected crash! Please log a bug with the commandline you specified.
ENOENT: no such file or directory, mkdir 'types/webpack-config-utils'

Expected:

It would be more user friendly to create the folder when it doesn't exist, ( mkdir -p like behaviour )

Hotell commented 6 years ago

whops ! looks like I was executing the command within types folder, my mistake!

Still it would be nice to provide some more specific error message :)

DetachHead commented 2 years ago

duplicate of #85