avajs / typescript

Test TypeScript projects using AVA.
MIT License
73 stars 16 forks source link

Automagically determine rewrite paths #2

Open novemberborn opened 4 years ago

novemberborn commented 4 years ago

It should be possible to resolve the TypeScript configuration (including extended configurations) to determine what source directories are output where. That way, users won't have to configure the rewrite paths.

I'm not sure if TypeScript supports multiple configuration files within a project. Babel does, but AVA's Babel support ignores such configuration files. It'll be simplest to do the same here.

This means we'll assume the nearest TypeScript configuration file is in the project directory itself.

cinderblock commented 4 years ago

While it does automatically crawl the entire tree to find a tsconfig.json file, it will stop at the first one it finds.

However, TypeScript configuration does support "extending" another config file.