Added test for TOC to .travis.yml (#205)

Runs doctoc for README*.md.
If in newly doctoc'ed README*.md there are any diffs against
ones commited in git HEAD then the test failes.
The script are using the latest anchor-markdown-header from repo
to avoid the bug with non-ASCII headers.
pull/206/head
Artem Buslov 6 years ago committed by Richard Littauer
parent ea40bf75ca
commit 14ea0820c8

2
.gitignore vendored

@ -0,0 +1,2 @@
node_modules/
package-lock.json

@ -3,6 +3,10 @@ rvm:
- 2.2
before_script:
- gem install awesome_bot
- npm install
script:
- awesome_bot README.md --allow-dupe --allow-redirect
- awesome_bot README_*.md --allow-dupe --allow-redirect
- node node_modules/doctoc/doctoc.js --github README.md README_*.md
- test -z "`git diff -- README.md`"
- test -z "`git diff -- README_*.md`"

@ -0,0 +1,10 @@
{
"private": true,
"name": "git-flight-rules",
"version": "1.0.0",
"description": "Flight rules for git",
"devDependencies": {
"doctoc": "^1.3.0",
"anchor-markdown-header": "thlorenz/anchor-markdown-header#master"
}
}
Loading…
Cancel
Save