Skip to content

Commit 3a6d3ed

Browse files
authored
docs: publish typedocs in gh-pages branch (#233)
Updates aegir to the latest version which has reinstated the `docs` command to publish typedocs in the `gh-pages` branch of repos. A `typedoc-urls.json` file is now generated as part of the docs run which allows cross-linking between module docs. This file lives at the "well known" location of `dist/typedoc-urls.json` in the published tarball, so the `files` list in `package.json` needed changing as it's currently only publishing `dist/types`.
1 parent 5be0a33 commit 3a6d3ed

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ types
77
test/ts-use/tsconfig.tsbuildinfo
88
types/tsconfig.tsbuildinfo
99
*.log
10+
dist
11+
.docs

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
[![multiformats.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://multiformats.io)
44
[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-multiformats.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-multiformats)
5-
[![CI](https://img.shields.io/github/workflow/status/multiformats/js-multiformats/test%20&%20maybe%20release/esm-migration?style=flat-square)](https://github.com/multiformats/js-multiformats/actions/workflows/js-test-and-release.yml)
5+
[![CI](https://img.shields.io/github/actions/workflow/status/multiformats/js-multiformats/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/multiformats/js-multiformats/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
66

77
> Interface for multihash, multicodec, multibase and CID
88
99
## Table of contents <!-- omit in toc -->
1010

1111
- [Install](#install)
12+
- [Browser `<script>` tag](#browser-script-tag)
1213
- [Interfaces](#interfaces)
1314
- [Creating Blocks](#creating-blocks)
1415
- [Multibase Encoders / Decoders / Codecs](#multibase-encoders--decoders--codecs)
@@ -20,6 +21,7 @@
2021
- [Multibase codecs](#multibase-codecs)
2122
- [Multihash hashers](#multihash-hashers-1)
2223
- [IPLD codecs (multicodec)](#ipld-codecs-multicodec)
24+
- [API Docs](#api-docs)
2325
- [License](#license)
2426
- [Contribution](#contribution)
2527

@@ -29,6 +31,14 @@
2931
$ npm i multiformats
3032
```
3133

34+
### Browser `<script>` tag
35+
36+
Loading this module through a script tag will make it's exports available as `Multiformats` in the global namespace.
37+
38+
```html
39+
<script src="https://unpkg.com/multiformats/dist/index.min.js"></script>
40+
```
41+
3242
## Interfaces
3343

3444
This library defines common interfaces and low level building blocks for various interrelated multiformat technologies (multicodec, multihash, multibase, and CID). They can be used to implement custom base encoders / decoders / codecs, codec encoders /decoders and multihash hashers that comply to the interface that layers above assume.
@@ -233,6 +243,10 @@ Other (less useful) bases implemented in [multiformats/js-multiformats](https://
233243
| `dag-pb` | `@ipld/dag-pb` | [ipld/js-dag-pb](https://github.com/ipld/js-dag-pb) |
234244
| `dag-jose` | `dag-jose` | [ceramicnetwork/js-dag-jose](https://github.com/ceramicnetwork/js-dag-jose) |
235245

246+
## API Docs
247+
248+
- <https://multiformats.github.io/js-multiformats>
249+
236250
## License
237251

238252
Licensed under either of

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"src",
4747
"test",
4848
"tsconfig.json",
49-
"dist/types",
49+
"dist",
5050
"vendor",
5151
"!**/*.tsbuildinfo",
5252
"!test/ts-use/node_modules"
@@ -250,6 +250,7 @@
250250
"lint": "aegir lint",
251251
"build": "aegir build",
252252
"release": "aegir release",
253+
"docs": "aegir docs",
253254
"test": "npm run lint && npm run test:node && npm run test:chrome && npm run test:ts",
254255
"test:ts": "npm run test --prefix test/ts-use",
255256
"test:node": "aegir test -t node --cov",
@@ -263,7 +264,7 @@
263264
"@stablelib/sha256": "^1.0.1",
264265
"@stablelib/sha512": "^1.0.1",
265266
"@types/node": "^18.0.0",
266-
"aegir": "^37.5.1",
267+
"aegir": "^37.7.5",
267268
"buffer": "^6.0.3",
268269
"cids": "^1.1.9"
269270
},

0 commit comments

Comments
 (0)