Skip to content

Commit

Permalink
docs: add documentation with typedoc using github action (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt authored Mar 26, 2020
1 parent 37b67ac commit 0b0b331
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docs
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm ci
- run: npm run docs
- run: touch docs/.nojekyll
- name: GitHub Pages
if: success()
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: docs
committer_name: googlemaps-bot
committer_email: [email protected]
commit_message: "chore: publish docs"
keep_history: true
env:
GITHUB_PAT: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
logs
*.log
dist/
docs/
# Runtime data
pids
*.pid
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ client
});
```

## Reference Documentation

The generated reference documentationcan be found [here](https://googlemaps.github.io/google-maps-services-js/). The TypeScript types are the authoritative documenation for this library and may differ slightly from the descriptions.

## Developing

In order to run the end-to-end tests, you'll need to supply your API key via an
Expand Down
102 changes: 102 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"dist"
],
"scripts": {
"docs": "rm -rf docs/ && typedoc .",
"prepare": "tsc",
"test": "jest src",
"test:e2e": "jest e2e",
Expand All @@ -57,10 +58,11 @@
"jest": "^25.2.2",
"semantic-release": "^17.0.2",
"ts-jest": "^25.2.1",
"typedoc": "^0.16.11",
"typescript": "^3.7.4"
},
"publishConfig": {
"registry":"https://wombat-dressing-room.appspot.com",
"registry": "https://wombat-dressing-room.appspot.com",
"access": "public"
},
"release": {
Expand Down
10 changes: 10 additions & 0 deletions typedoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
mode: "modules",
target: "es6",
out: "docs",
exclude: ["**/node_modules/**", "**/*.spec.ts", "**/*.test.ts", "dist"],
name: "Google Maps Services Node Client",
ignoreCompilerErrors: false,
module: "commonjs",
readme: "./README.md"
};

0 comments on commit 0b0b331

Please sign in to comment.