Skip to content

Commit

Permalink
Merge pull request #296 from rtfpessoa/add-toc
Browse files Browse the repository at this point in the history
doc: Add table of contents in readme
  • Loading branch information
rtfpessoa authored Jan 18, 2020
2 parents 3be8155 + e284b58 commit df4481f
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 186 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,32 @@ diff2html generates pretty HTML diffs from git diff or unified diff output.

[![NPM](https://nodei.co/npm/diff2html.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/diff2html/)

## Table of Contents

<!-- toc -->

- [Features](#features)
- [Online Example](#online-example)
- [Distributions](#distributions)
- [Diff2Html Usage](#diff2html-usage)
- [Diff2Html API](#diff2html-api)
- [Diff2Html Configuration](#diff2html-configuration)
- [Diff2Html Browser](#diff2html-browser)
- [Diff2Html NPM / Node.js Library](#diff2html-npm--nodejs-library)
- [Diff2Html Examples](#diff2html-examples)
- [Diff2HtmlUI](#diff2htmlui)
- [Diff2HtmlUI API](#diff2htmlui-api)
- [Diff2HtmlUI Configuration](#diff2htmlui-configuration)
- [Diff2HtmlUI Browser](#diff2htmlui-browser)
- [Troubleshooting](#troubleshooting)
- [1. Out of memory or Slow execution](#1-out-of-memory-or-slow-execution)
- [Contribute](#contribute)
- [Contributors](#contributors)
- [License](#license)
- [Thanks](#thanks)

<!-- tocstop -->

## Features

- Supports git and unified diffs
Expand Down Expand Up @@ -379,12 +405,12 @@ document.addEventListener('DOMContentLoaded', () => {

- Disable the line matching algorithm, by setting the option `{"matching": "none"}` when invoking diff2html

## Contributions
## Contribute

This is a developer friendly project, all the contributions are welcome. To contribute just send a pull request with
your changes following the guidelines described in `CONTRIBUTING.md`. I will try to review them as soon as possible.

## Contributors
## Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"build:css": "rm -rf ./bundles/css; postcss --config ./postcss.config.js --no-map -o ./bundles/css/diff2html.min.css ./src/ui/css/diff2html.css",
"build:templates": "ts-node ./scripts/hulk.ts --wrapper ts --variable 'defaultTemplates' ./src/templates/*.mustache > ./src/diff2html-templates.ts",
"build:website": "rm -rf docs; webpack ---display-reasons --display-modules --mode production --config webpack.website.ts",
"build:toc-base": "markdown-toc --maxdepth 3 --bullets='-' -i",
"build:toc": "yarn run build:toc-base README.md",
"test": "is-ci 'test:coverage' 'test:watch'",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch",
Expand Down Expand Up @@ -78,6 +80,10 @@
"**/*.+(css|html|md|mdx)": [
"prettier --write",
"git add"
],
"README.md": [
"yarn run build:toc-base",
"git add"
]
},
"dependencies": {
Expand Down Expand Up @@ -127,6 +133,7 @@
"is-ci-cli": "2.0.0",
"jest": "24.9.0",
"lint-staged": "9.5.0",
"markdown-toc": "^1.2.0",
"mini-css-extract-plugin": "0.9.0",
"mkdirp": "0.5.1",
"nopt": "4.0.1",
Expand Down
Loading

0 comments on commit df4481f

Please sign in to comment.