Le 05/05/2015 20:57, Tim Caswell a écrit :
Ahh, sorry for the bad url, I meant https://www.npmjs.com/.

I didn't mention luvit.io/lit.html <http://luvit.io/lit.html> because it didn't exist at the time.
oh, sorry for that.


I agree that high-level API docs and examples would be the most useful along with basic description. I've considered adding a field to the package metadata called "documentation" pointing to a markdown file in the package or "examples" pointing to a lua file. Also as a fallback I could look for a README near the homepage, but then I'm scraping github which has rate limits and could be problematic. As much as I want to keep lit packages small in sice, I think it's useful to have some basic docs in the package.

How about having a tri mode property for "documentation". If the value is a valid url, hyperlink to that external resource. If it's the path to a file in the package, render it inline. As a fallback, assume the content is the data.

Could be nice, but making too much rules will lead to longer learning curve and are error prone, except if mandatory fields are checked at `lit publish` time.

Some examples to show what I mean:

documentation = "http://mysite.org/docs.html"; -- Link to external resource
  documentation = "README.md" -- link to internal file in bundle
  documentation = [[
# My package

Here is my documentation!
]] -- inline markdown, useful for single-file packages.

--
You received this message because you are subscribed to the Google Groups 
"luvit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to