Skip to content

Commit

Permalink
docs(ESLint): gen docs with ESLint plugin reference
Browse files Browse the repository at this point in the history
  • Loading branch information
fjcaetano committed Feb 18, 2020
1 parent 2e7a9f6 commit b28dfc2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules/
dist/
*.log
coverage/
docs/
docs/
pageDocs/
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build": "tsc && prettier --check 'dist/**/*' --write",
"test": "jest --coverage",
"lint": "eslint --ext=.ts,.tsx --max-warnings=0 src/ && prettier --check 'src/**/*'",
"docs": "typedoc --out docs/$npm_package_version && scripts/gen-docs-index.sh $npm_package_version",
"docs": "scripts/gen-docs.sh $npm_package_version",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
},
"main": "dist/index.js",
Expand Down Expand Up @@ -54,6 +54,7 @@
"react-test-renderer": "^16.9.0",
"ts-jest": "^24.1.0",
"typedoc": "^0.16.9",
"typescript": "^3.7"
"typescript": "^3.7",
"typedoc-plugin-markdown-pages": "^0.3.0"
}
}
5 changes: 0 additions & 5 deletions scripts/gen-docs-index.sh

This file was deleted.

11 changes: 11 additions & 0 deletions scripts/gen-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

PKG_VERSION=$1

mkdir pageDocs && ln -sf ../eslint-plugin/README.md pageDocs/EslintPlugin.md

yarn run typedoc --out "docs/${PKG_VERSION}"

echo "<meta http-equiv='refresh' content='0; URL=\"${PKG_VERSION}/index.html\"' />;" > docs/index.html

rm -rf pageDocs
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
},
"typedocOptions": {
"exclude": "src/__tests__/**/*",
"out": "docs"
"out": "docs",
"mdPagesSourcePath": "pageDocs",
"theme": "markdown-pages"
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5371,6 +5371,11 @@ typedoc-default-themes@^0.7.2:
lunr "^2.3.8"
underscore "^1.9.1"

typedoc-plugin-markdown-pages@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown-pages/-/typedoc-plugin-markdown-pages-0.3.0.tgz#17f0f9ff3aa312e9ed142eb15ea216ea95d5fb5f"
integrity sha512-QVWs6eL0BEOiRgJm6wRRgE8kESFv85HlefLv14ZbMM2VQ1HqErVeT9ukbhkYMznsD/juAsX3Xc5M+Ju7/ZDq4Q==

typedoc@^0.16.9:
version "0.16.9"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.16.9.tgz#d6f46f4dea7d3362029927a92981efdf896f435b"
Expand Down

0 comments on commit b28dfc2

Please sign in to comment.