Skip to content

Commit

Permalink
feat: added github-pages and typedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-master committed Oct 13, 2020
1 parent ecf1ff4 commit 3d8af7e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
coverage
docs
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
prepare-release:
npm install
npm lint
npm prettier:ci
npm test
npm build
.PHONY: prepare-release

build-docs:
npx rimraf ./docs
npx typedoc --options ./typedoc.js
.PHONY: build-docs

publish-docs: build-docs
rm -rf /tmp/persian-tools-docs | true
mkdir /tmp/persian-tools-docs
cp -r ./docs /tmp/persian-tools-docs
cd /tmp/persian-tools-docs && \
git clone --single-branch --branch gh-pages [email protected]:persian-tools/persian-tools.git && \
cd /tmp/persian-tools-docs && \
ls -la
git add --all && \
git commit -m "meta: Update docs" && \
git push origin gh-pages
.PHONY: publish-docs
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"release": "npm run build",
"postrelease": "standard-version",
"prettier": "prettier --write 'src/**/*.{ts,json}' --config .prettierrc.js",
"prettier:ci": "prettier --list-different 'src/**/*.{ts,json}' --config .prettierrc.js"
"prettier:ci": "prettier --list-different 'src/**/*.{ts,json}' --config .prettierrc.js",
"generate:docs": "rimraf ./docs && typedoc --options ./typedoc.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -62,6 +63,7 @@
"jest-cli": "^26.4.2",
"prettier": "^2.1.2",
"prettier-eslint": "^11.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.28.2",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
Expand All @@ -71,6 +73,7 @@
"rollup-plugin-uglify": "^6.0.4",
"standard-version": "^9.0.0",
"ts-jest": "^26.4.0",
"typedoc": "^0.19.2",
"typescript": "^4.0.3",
"uglify-es": "^3.3.9"
},
Expand Down
14 changes: 14 additions & 0 deletions typedoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
out: "./docs/",
readme: "README.md",
name: "Persian Tools",
includes: "./src",
exclude: ["**/test/**/*", "**/*.js", "**/dist/**/*", "**/src/dummy/**"],
mode: "modules",
excludeExternals: true,
includeDeclarations: true,
includeVersion: true,
excludeNotExported: true,
excludePrivate: false,
experimentalDecorators: true,
};

0 comments on commit 3d8af7e

Please sign in to comment.