downlevel-dts icon indicating copy to clipboard operation
downlevel-dts copied to clipboard

Output folder being read as input, causes increasingly nesting output folders on each run

Open justinfagnani opened this issue 3 years ago • 1 comments

We run downlevel-dts as instructed here, with: downlevel-dts . ts3.4 && cp tsconfig.json ./ts3.4/, but on subsequent runs this causes the ./ts3.4 folder to be read as input and then included in the output folder.

We get something like

.
├── lib
├── ...
├── ts3.4
│   ├── ...
│   ├── ts3.4
│   │   ├── ...
│   │   ├── ts3.4

See https://github.com/Polymer/lit-element/issues/976

Seems like downlevel-dts should exclude the output folder from its inputs.

justinfagnani avatar Aug 13 '20 20:08 justinfagnani

I just ran into this as well. A preferable option that assumes less about users' directory structure would be to accept *.d.ts files as direct inputs, i.e. downlevel-dts dist/*.d.ts dist/ts3.4.

lazytype avatar Aug 25 '20 21:08 lazytype