adelsz / pgtyped

pgTyped - Typesafe SQL in TypeScript
https://pgtyped.dev
MIT License
2.91k stars 94 forks source link

[DOCS]: Clarify Relativity of `srcDir` Option #572

Open ITenthusiasm opened 6 months ago

ITenthusiasm commented 6 months ago

The Problem

I just spent roughly 15-30min trying to get the pgtyped CLI to recognize my .sql files. :sweat_smile: Ultimately, the issue came down to the fact that the CLI seems to resolve srcDir relative to where the command is executed (instead of being relative to where the configuration file is located). I fixed the problem by using __dirname instead of ./.

The Solution

I think additional documentation would be super helpful here! It's so close! Perhaps we could make a minor modification for clarity:

Directory to scan or watch for query files (relative to where the pgtyped command is executed).

This would've saved me a lot of time. :sweat_smile:


I know it's a small change, but I'm not able to fork and open a PR now. If you think this is a good idea and can't get to it this week, maybe I can try by the weekend? I'm assuming it would be a small change?