Skip to content

Commit

Permalink
docs: add ToC for README.md and CONTRIBUTING.md (closes #170) (#171)
Browse files Browse the repository at this point in the history
* docs: add doctoc to generate ToC

* chore: install doctoc

* docs: add @morajabi in contributors
  • Loading branch information
morajabi authored and Kent C. Dodds committed Sep 3, 2017
1 parent ce41f86 commit 7b4a40c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,16 @@
"code",
"example"
]
},
{
"login": "morajabi",
"name": "Mohammad Rajabifard",
"avatar_url": "https://avatars3.githubusercontent.com/u/12202757?v=4",
"profile": "https://morajabi.me",
"contributions": [
"doc",
"ideas"
]
}
]
}
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ Thanks for being willing to contribute!
**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub][egghead]

## Table of Contents
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Project setup](#project-setup)
- [Add yourself as a contributor](#add-yourself-as-a-contributor)
- [Committing and Pushing changes](#committing-and-pushing-changes)
- [Help needed](#help-needed)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Project setup

1. Fork and clone the repo
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ autocomplete/dropdown/select/combobox components</p>
[![version][version-badge]][package]
[![MIT License][license-badge]][LICENSE]

[![All Contributors](https://img.shields.io/badge/all_contributors-24-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Chat][chat-badge]][chat]
[![Code of Conduct][coc-badge]][coc]
Expand Down Expand Up @@ -51,6 +51,24 @@ harder to contribute to.
> NOTE: The original use case of this component is autocomplete, however the API
> is powerful and flexible enough to build things like dropdowns as well.
## Table of Contents
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Installation](#installation)
- [Usage](#usage)
- [Props](#props)
- [Control Props](#control-props)
- [Child Callback Function](#child-callback-function)
- [Examples](#examples)
- [Inspiration](#inspiration)
- [Other Solutions](#other-solutions)
- [Contributors](#contributors)
- [LICENSE](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installation

This module is distributed via [npm][npm] which is bundled with [node][node] and
Expand Down Expand Up @@ -128,7 +146,7 @@ function App() {
calls the child function and renders that. Wrap everything in
`<Downshift>{/* your function here! */}</Downshift>`.

## Props:
## Props

### defaultSelectedItem

Expand Down Expand Up @@ -536,7 +554,7 @@ Thanks goes to these people ([emoji key][emojis]):
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars2.githubusercontent.com/u/15073300?v=4" width="100px;"/><br /><sub>monssef</sub>](https://github.com/rezof)<br />[馃挕](#example-rezof "Examples") | [<img src="https://avatars2.githubusercontent.com/u/5382443?v=4" width="100px;"/><br /><sub>Federico Zivolo</sub>](https://fezvrasta.github.io)<br />[馃摉](https://github.com/paypal/downshift/commits?author=FezVrasta "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/746482?v=4" width="100px;"/><br /><sub>Divyendu Singh</sub>](https://divyendusingh.com)<br />[馃挕](#example-divyenduz "Examples") | [<img src="https://avatars1.githubusercontent.com/u/841955?v=4" width="100px;"/><br /><sub>Muhammad Salman</sub>](https://github.com/salmanmanekia)<br />[馃捇](https://github.com/paypal/downshift/commits?author=salmanmanekia "Code") | [<img src="https://avatars3.githubusercontent.com/u/10820159?v=4" width="100px;"/><br /><sub>Jo茫o Alberto</sub>](https://twitter.com/psicotropidev)<br />[馃捇](https://github.com/paypal/downshift/commits?author=psicotropicos "Code") | [<img src="https://avatars0.githubusercontent.com/u/16327281?v=4" width="100px;"/><br /><sub>Bernard Lin</sub>](https://github.com/bernard-lin)<br />[馃捇](https://github.com/paypal/downshift/commits?author=bernard-lin "Code") [馃摉](https://github.com/paypal/downshift/commits?author=bernard-lin "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/7330124?v=4" width="100px;"/><br /><sub>Geoff Davis</sub>](https://geoffdavis.info)<br />[馃挕](#example-geoffdavis92 "Examples") |
| [<img src="https://avatars0.githubusercontent.com/u/3415488?v=4" width="100px;"/><br /><sub>Anup</sub>](https://github.com/reznord)<br />[馃摉](https://github.com/paypal/downshift/commits?author=reznord "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/340520?v=4" width="100px;"/><br /><sub>Ferdinand Salis</sub>](http://ferdinandsalis.com)<br />[馃悰](https://github.com/paypal/downshift/issues?q=author%3Aferdinandsalis "Bug reports") [馃捇](https://github.com/paypal/downshift/commits?author=ferdinandsalis "Code") | [<img src="https://avatars2.githubusercontent.com/u/662750?v=4" width="100px;"/><br /><sub>Kye Hohenberger</sub>](https://github.com/tkh44)<br />[馃悰](https://github.com/paypal/downshift/issues?q=author%3Atkh44 "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/1443499?v=4" width="100px;"/><br /><sub>Julien Goux</sub>](https://github.com/jgoux)<br />[馃悰](https://github.com/paypal/downshift/issues?q=author%3Ajgoux "Bug reports") [馃捇](https://github.com/paypal/downshift/commits?author=jgoux "Code") [鈿狅笍](https://github.com/paypal/downshift/commits?author=jgoux "Tests") | [<img src="https://avatars2.githubusercontent.com/u/9586897?v=4" width="100px;"/><br /><sub>Joachim Seminck</sub>](https://github.com/jseminck)<br />[馃捇](https://github.com/paypal/downshift/commits?author=jseminck "Code") | [<img src="https://avatars3.githubusercontent.com/u/954596?v=4" width="100px;"/><br /><sub>Jesse Harlin</sub>](http://jesseharlin.net/)<br />[馃悰](https://github.com/paypal/downshift/issues?q=author%3Athe-simian "Bug reports") [馃挕](#example-the-simian "Examples") | [<img src="https://avatars0.githubusercontent.com/u/1402095?v=4" width="100px;"/><br /><sub>Matt Parrish</sub>](https://github.com/pbomb)<br />[馃敡](#tool-pbomb "Tools") |
| [<img src="https://avatars1.githubusercontent.com/u/11661846?v=4" width="100px;"/><br /><sub>thom</sub>](http://thom.kr)<br />[馃捇](https://github.com/paypal/downshift/commits?author=thomhos "Code") | [<img src="https://avatars2.githubusercontent.com/u/1088312?v=4" width="100px;"/><br /><sub>Vu Tran</sub>](http://twitter.com/tranvu)<br />[馃捇](https://github.com/paypal/downshift/commits?author=vutran "Code") | [<img src="https://avatars1.githubusercontent.com/u/74193?v=4" width="100px;"/><br /><sub>Codie Mullins</sub>](https://github.com/codiemullins)<br />[馃捇](https://github.com/paypal/downshift/commits?author=codiemullins "Code") |
| [<img src="https://avatars1.githubusercontent.com/u/11661846?v=4" width="100px;"/><br /><sub>thom</sub>](http://thom.kr)<br />[馃捇](https://github.com/paypal/downshift/commits?author=thomhos "Code") | [<img src="https://avatars2.githubusercontent.com/u/1088312?v=4" width="100px;"/><br /><sub>Vu Tran</sub>](http://twitter.com/tranvu)<br />[馃捇](https://github.com/paypal/downshift/commits?author=vutran "Code") | [<img src="https://avatars1.githubusercontent.com/u/74193?v=4" width="100px;"/><br /><sub>Codie Mullins</sub>](https://github.com/codiemullins)<br />[馃捇](https://github.com/paypal/downshift/commits?author=codiemullins "Code") [馃挕](#example-codiemullins "Examples") | [<img src="https://avatars3.githubusercontent.com/u/12202757?v=4" width="100px;"/><br /><sub>Mohammad Rajabifard</sub>](https://morajabi.me)<br />[馃摉](https://github.com/paypal/downshift/commits?author=morajabi "Documentation") [馃](#ideas-morajabi "Ideas, Planning, & Feedback") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors][all-contributors] specification.
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"start": "nps",
"test": "nps test",
"doc": "doctoc README.md CONTRIBUTING.md --maxlevel 2 --notitle",
"precommit": "lint-staged && opt --in pre-commit --exec \"npm start validate\""
},
"files": [
Expand All @@ -33,8 +34,8 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "MIT",
"peerDependencies": {
"react": ">=15",
"prop-types": ">=15"
"prop-types": ">=15",
"react": ">=15"
},
"devDependencies": {
"@storybook/react": "^3.2.3",
Expand All @@ -50,6 +51,7 @@
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"babel-register": "^6.24.1",
"doctoc": "^1.3.0",
"enzyme": "^2.9.1",
"enzyme-to-json": "^1.5.1",
"eslint": "^4.2.0",
Expand Down Expand Up @@ -82,7 +84,8 @@
"*.js": [
"prettier-eslint --write --no-semi --single-quote --trailing-comma=all --no-bracket-spacing",
"git add"
]
],
"*.md": "doc"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 7b4a40c

Please sign in to comment.