diff --git a/.travis.yml b/.travis.yml index e476b333885..467f88577b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,6 +67,7 @@ jobs: - npm run test-install - npm run lint - npm run test-doclint + - npm run ensure-new-docs-up-to-date # Runs unit tests on Linux + Firefox - node_js: "10.19.0" diff --git a/package.json b/package.json index 439c4d6fc86..22e78b780a4 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "update-protocol-d-ts": "node utils/protocol-types-generator update", "compare-protocol-d-ts": "node utils/protocol-types-generator compare", "test-install": "scripts/test-install.sh", - "generate-docs": "npm run tsc && api-extractor run --local --verbose && api-documenter markdown -i temp -o new-docs" + "generate-docs": "npm run tsc && api-extractor run --local --verbose && api-documenter markdown -i temp -o new-docs", + "ensure-new-docs-up-to-date": "npm run generate-docs && exit `git status --porcelain | head -255 | wc -l`" }, "files": [ "lib/",