benjamn / recast

JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator
MIT License
5.01k stars 350 forks source link

Document public API #316

Open nene opened 8 years ago

nene commented 8 years ago

Every time I fiddle with Recast API I have to dig through the source code to find out which methods are available and which configuration options are possible.

For start, a link from README to options.js would be great.

I'm open to submitting a PR, though I don't really know all the aspects.

benjamn commented 8 years ago

I absolutely agree, and I apologize for the absence of good documentation. I've tried to keep the API simple enough that it can be used without knowledge of the fine details, but that excuse is ringing less and less true as time goes on.

I'm not sure when I'll have time to write up truly adequate documentation, but I would absolutely take a PR that added a link to options.js to README.md, if you have time.

adiba commented 7 years ago

Just some JSDoc would help a lot. The code already is commented, but not with JSDoc.

N1kto commented 4 years ago

For those seeking more info on API documentation, I found ast-types package README very helpful in terms of documentation source. That package kind of "powers" this one, so its really helpful.