Readme-Guide.md
This file
Path
Readme-Guide.md
125 lines · 4.2 KiB · Markdown
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 76bf96e point at it.
deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e
lines 1–125why, one step back1# README guidelines23Every module in the expressjs, pillarjs, and jshttp organizations should have4a README file named `README.md`. The purpose of the README is to:56- Explain the purpose of the module and how to use it.7- Act as a landing page (both on GitHub and npmjs.com) for the module to help8 people find it via search. Middleware module READMEs are also incorporated9 into https://expressjs.com/en/resources/middleware.html.10- Encourage community contributions and participation.1112Use the [README template](https://github.com/expressjs/express/wiki/README-template)13to quickly create a new README file.1415## Top-level items1617**Badges** (optional): At the very top (with no subheading), include any18applicable badges, such as npm version/downloads, build status, test coverage,19and so on. Badges should resolve properly (not display a broken image).2021Possible badges include:22- npm version: `[![NPM Version][npm-image]][npm-url]`23- npm downloads: `[![NPM Downloads][downloads-image]][downloads-url]`24- Build status: `[![Build Status][travis-image]][travis-url]`25- Test coverage: `[![Test Coverage][coveralls-image]][coveralls-url]`26- Tips: `[![Gratipay][gratipay-image]][gratipay-url]`2728**Summary**: Following badges, provide a one- or two-sentence description of29what the module does. This should be the same as the npmjs.org blurb (which30comes from the description property of `package.json`). Since npm doesn't31handle markdown for the blurb, avoid using markdown in the summary sentence.3233**TOC** (Optional): For longer READMEs, provide a table of contents that has34a relative link to each section. A tool such as35[doctoc](https://www.npmjs.com/package/doctoc) makes it very easy to generate36a TOC.3738## Overview3940Optionally, include a section of one or two paragraphs with more high-level41information on what the module does, what problems it solves, why one would42use it and how. Don't just repeat what's in the summary.4344## Installation4546Required. This section is typically just:4748```sh49$ npm install module-name50```5152But include any other steps or requirements.5354NOTE: Use the `sh` code block to make the shell command display properly on55the website.5657## Basic use5859- Provide a general description of how to use the module with code sample.60 Include any important caveats or restrictions.61- Explain the most common use cases.62- Optional: a simple "hello world" type example (where applicable). This63 example is in addition to the more comprehensive [example section](#examples)64 later.6566## API6768Provide complete API documentation.6970Formatting conventions: Each function is listed in a 3rd-level heading (`###`),71like this:7273```74### Function_name(arg, options [, optional_arg] ... )75```7677**Options objects**7879For arguments that are objects (for example, options object), describe the80properties in a table, as follows. This matches the formatting used in the81[Express API docs](https://expressjs.com/en/4x/api.html).8283|Property | Description | Type | Default|84|----------|-----------|------------|-------------|85|Name of the property in `monospace`. | Brief description | String, Number, Boolean, etc. | If applicable.|8687If all the properties are required (i.e. there are no defaults), then you88can omit the default column.8990Instead of very lengthy descriptions, link out to subsequent paragraphs for91more detailed explanation of specific cases (e.g. "When this property is set92to 'foobar', xyz happens; see <link to following section >.)9394If there are options properties that are themselves options, use additional95tables. See [`trust proxy` and `etag` properties](https://expressjs.com/en/4x/api.html#app.settings.table).9697## Examples9899Every README should have at least one example; ideally more. For code samples,100be sure to use the `js` code block, for proper display in the website, e.g.:101102```js103var csurf = require('csurf')104...105```106107## Tests108109What tests are included.110111How to run them.112113The convention for running tests is `npm test`. All our projects should follow114this convention.115116## Contributors117118Names of module "owners" (lead developers) and other developers who have119contributed.120121## License122123Link to the license, with a short description of what it is, e.g. "MIT" or124whatever. Ideally, avoid putting the license text directly in the README; link125to it instead.