davidfig / pixi-viewport

A highly configurable viewport/2D camera designed to work with pixi.js
https://davidfig.github.io/pixi-viewport/
MIT License
1.04k stars 174 forks source link

[Docs] Suggestion: keep Jsdocs in npm package? #479

Open metruzanca opened 6 months ago

metruzanca commented 6 months ago

Seems you've got very good Jsdoc comments in this package, but they're only being used to generate the web docs and stripped out from the package. Stripping them out for cdn (.min) files makes sense, but for npm packages it would be very nice to maintain those inline doc comments.

Before: Code_-_Insiders_ZdpRcoQwaq

After: Code_-_Insiders_IEH4pFoXRa Here I've just copy pasted the jsdoc comment from src for fit and pasted it into the Viewport.d.ts file.

Overall, I think this would be a huge UX improvement for consumers of the library. Sure, docs will still be used/needed for more long form writing, but just to make sure you've got the right method, this would be great help.