Open mrseanryan opened 4 years ago
Hi @mrseanryan, following up from #132
It's a nice enhancement. Hoping that the inference logic is quite robust. Some cases to think about are:
"main"
in package.json
as dist/index.js
but no src/index.ts
."main": "dist/esm/index.js"
because we are generating multiple types of distributions.I'm sure you'd have some criteria to effectively handle multiple scenarios, but just pointing out some cases which I personally would benefit more from.
Further, it would be great if the users can provide a glob/regex to specify which files to analyze. It (along with the already existing ignoreFiles
option) would offer a great amount of control. The README seems to have some formatting issue related to the ignoreFiles
option though.
Thank you @maneetgoyal for the library link. That library seems to be all .html
or .tsx
files no regular .ts
files? To be honest, this kind of project is not something I've been thinking about (moistly working with ts
and tsx
files. So this example is interesting.
I will fix the README format.
For the glob/regex - have logged issue #136
Ignore unused exports from the entry point of library (package.json).
This could be useful for source code of libraries.
So if
package.json
says:Then use
tsconfig.json
to infer thatsrc/app.ts
is the entry point. Then ignore unused exports from that file.note: there is a workaround, using the
ignorePaths=app.ts
option - but that is not as nice to use.