gcanti / docs-ts

A zero-config documentation tool for my TypeScript projects
https://gcanti.github.io/docs-ts/
MIT License
101 stars 17 forks source link

Omit `.ts` in sidebar #41

Open m-bock opened 3 years ago

m-bock commented 3 years ago

Another small one:

Should we omit the .ts in the generated module names in the sidebar?

IMax153 commented 3 years ago

I think this is overall a matter of preference, but the purpose of docs-ts in my opinion is to output documentation that somewhat mirrors the structure of your source code. I think having the .ts extension in the sidebar is helpful for figuring out what file in the source code the Markdown document is referring to (even though it should be pretty obvious).

So I would vote to keep the .ts extension.

samhh commented 3 years ago

I'd argue otherwise @IMax153.

Taking fp-ts as an example, I import from fp-ts/Option, not fp-ts/Option.ts. The file extension is in a sense an implementation detail only relevant to the bundler or engine.