Skip to content
This repository

Any plan about module document specification? #4194

Open
perfectworks opened this Issue · 2 comments

2 participants

Ethan Zhang Tim Oxley
Ethan Zhang

For now, each module has individual document which write by different format, so every developer must visit a bunch of API document website. So I think it will be more connivance by virtue of document specification and npm server support.

For example, we can assign a new item in package.json:

{
//...
    "doc": "README.md"
//...
}

Then we can get a well-formated manual page by some simple npm client command like npm doc MODULE_NAME.

In addition, some thirdparty document softwares (like dash) can intergration npm document more easier.

Tim Oxley
Collaborator

@perfectworks There is already support for man pages and doc in the package.json:

You can also view a module's readme with npm view modulename readme, e.g.:

npm view mux-demux readme

Also npm doc MODULE_NAME already works, takes user to the project's homepage.

Tim Oxley
Collaborator

Given node generally doesn't rally behind 'convention over configuration' , I have doubts whether npm will ever standardise around a defined documentation format further than man pages and readmes. Such a convention would probably be best served as a 3rd party initiative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.