Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add typedoc, test doc generation #588

Merged
merged 35 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
53dc843
add typedoc, test doc generation
Apr 25, 2024
27196f7
add markdown plugin, add md rendered docs
Apr 25, 2024
76cf34a
ignore src/generated from doc generation
Apr 25, 2024
9222af4
Merge branch 'main' of github.com:digidem/mapeo-core-next into feat/t…
May 7, 2024
a22b9d8
add docs ci workflow for publishing
May 7, 2024
9f99ffb
add flow to PR
May 7, 2024
faf7ea8
odd npm doc:publish script
May 7, 2024
c79c83b
remove old docs/api path
May 7, 2024
5d0c422
test preview page deploy
May 7, 2024
d9e336f
ignore generated html
May 7, 2024
d606de2
remove preview
May 8, 2024
4113937
Merge branch 'main' of github.com:digidem/mapeo-core-next into feat/t…
May 8, 2024
0fb24a2
Merge branch 'main' of github.com:digidem/mapeo-core-next into feat/t…
May 9, 2024
315dc97
ignore docs for eslint
May 9, 2024
518de6d
add plugin for missing exports (not explicitly exported but used by e…
May 9, 2024
cd09509
Merge branch 'main' of github.com:digidem/mapeo-core-next into feat/t…
May 13, 2024
b28237f
disable sources
May 13, 2024
7489da9
test commiting new api docs on prepublish
May 14, 2024
6c1a966
test modifying repo docs on push (before testing on prerelease flow)
May 14, 2024
3c4ae20
add action/checkout@v4 to publish docs api to repo
May 14, 2024
ffe1d45
change order of steps to have node and npm
May 14, 2024
41f13aa
fix stuff
May 14, 2024
4d247fb
git user setup
May 14, 2024
896d664
remove unnecessary step, remove git fetch
May 14, 2024
ce0117c
use external action to update repo
May 14, 2024
f41d3dc
allow gh action to write repo (!!)
May 14, 2024
cd48cad
update docs/README.md to point to md api
May 14, 2024
f15840d
Merge branch 'main' of github.com:digidem/mapeo-core-next into feat/t…
May 14, 2024
4a624f1
Update api markdown docs
tomasciccola May 14, 2024
3fdcafe
Merge branch 'feat/typedoc' of github.com:digidem/mapeo-core-next int…
May 14, 2024
fa2cac7
remove api doc generation on every push (in docs.yml), move action to…
May 21, 2024
253a672
Merge branch 'main' of github.com:digidem/mapeo-core-next into feat/t…
May 21, 2024
9597131
fix: accidentally removd actions/checkout on docs.yml
May 21, 2024
c57b001
forgot to add `npm ci` to docs.yml
May 21, 2024
286adbe
Apply suggestions from code review
tomasciccola May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish documentation
on:
push:
branches:
- main
pull_request:

jobs:
publish-documentation:
permissions:
id-token: write
pages: write
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Generate HTML documentation
run: |
npm ci
npm run doc:publish
- id: upload-documentation
name: Upload documentation to Pages
uses: actions/upload-pages-artifact@v2
with:
path: docs/api/html
- id: deployment
name: Deploy documentation to GitHub Pages
uses: actions/deploy-pages@v2
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v4
- name: Set git user
uses: fregante/setup-git-user@v1
- name: Generate Api docs
run: |
npm ci
npm run doc
- name: Push updated markdown docs
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'feat: update api markdown docs'
tomasciccola marked this conversation as resolved.
Show resolved Hide resolved
file_pattern: 'docs/api/md/*'
- uses: nearform-actions/optic-release-automation-action@v4
with:
commit-message: 'Release {version}'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ proto/build
/dist
!/drizzle/**/*.sql
.eslintcache
docs/api/html/*
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In most cases you'll be using the [mobile](https://github.com/digidem/mapeo-mobi

## API reference

Get detailed information about the classes, methods, function, and types of Mapeo Core in the [API docs](./api/).
Get detailed information about the classes, methods, function, and types of Mapeo Core in the [API docs](./api/md/).

## Developing

Expand Down
1 change: 1 addition & 0 deletions docs/api/md/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
71 changes: 71 additions & 0 deletions docs/api/md/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
API

# API

## Table of contents

### Modules

- [\<internal\>](modules/internal_.md)

### Classes

- [FastifyController](classes/FastifyController.md)
- [MapeoManager](classes/MapeoManager.md)

### Functions

- [MapeoMapsFastifyPlugin](README.md#mapeomapsfastifyplugin)
- [MapeoOfflineFallbackMapFastifyPlugin](README.md#mapeoofflinefallbackmapfastifyplugin)
- [MapeoStaticMapsFastifyPlugin](README.md#mapeostaticmapsfastifyplugin)

## Functions

### MapeoMapsFastifyPlugin

▸ **MapeoMapsFastifyPlugin**(`instance`, `opts`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `instance` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> |
| `opts` | [`MapsPluginOpts`](interfaces/internal_.MapsPluginOpts.md) |

#### Returns

`Promise`\<`void`\>

___

### MapeoOfflineFallbackMapFastifyPlugin

▸ **MapeoOfflineFallbackMapFastifyPlugin**(`instance`, `opts`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `instance` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> |
| `opts` | [`OfflineFallbackMapPluginOpts`](interfaces/internal_.OfflineFallbackMapPluginOpts.md) |

#### Returns

`Promise`\<`void`\>

___

### MapeoStaticMapsFastifyPlugin

▸ **MapeoStaticMapsFastifyPlugin**(`instance`, `opts`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `instance` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> |
| `opts` | [`StaticMapsPluginOpts`](interfaces/internal_.StaticMapsPluginOpts.md) |

#### Returns

`Promise`\<`void`\>
68 changes: 68 additions & 0 deletions docs/api/md/classes/FastifyController.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[API](../README.md) / FastifyController

# Class: FastifyController

## Table of contents

### Constructors

- [constructor](FastifyController.md#constructor)

### Methods

- [start](FastifyController.md#start)
- [started](FastifyController.md#started)
- [stop](FastifyController.md#stop)

## Constructors

### constructor

• **new FastifyController**(`opts`): [`FastifyController`](FastifyController.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `opts` | `Object` |
| `opts.fastify` | `FastifyInstance`\<`RawServerDefault`, `IncomingMessage`, `ServerResponse`\<`IncomingMessage`\>, `FastifyBaseLogger`, `FastifyTypeProviderDefault`\> |

#### Returns

[`FastifyController`](FastifyController.md)

## Methods

### start

▸ **start**(`opts?`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `opts?` | [`StartOpts`](../interfaces/internal_.StartOpts.md) |

#### Returns

`Promise`\<`void`\>

___

### started

▸ **started**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

___

### stop

▸ **stop**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>
Loading
Loading