Skip to content

Commit 310dbf6

Browse files
authored
docs: publish api docs (#68)
Publish typedocs on gh-pages branch
1 parent b6d95bd commit 310dbf6

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

README.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# is-ipfs <!-- omit in toc -->
22

33
[![codecov](https://img.shields.io/codecov/c/github/ipfs-shipyard/is-ipfs.svg?style=flat-square)](https://codecov.io/gh/ipfs-shipyard/is-ipfs)
4-
[![CI](https://img.shields.io/github/workflow/status/ipfs-shipyard/is-ipfs/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs-shipyard/is-ipfs/actions/workflows/js-test-and-release.yml)
4+
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs-shipyard/is-ipfs/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs-shipyard/is-ipfs/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
55

66
> A set of utilities to help identify IPFS resources on the web
77
88
## Table of contents <!-- omit in toc -->
99

1010
- [Install](#install)
11+
- [Browser `<script>` tag](#browser-script-tag)
1112
- [Usage](#usage)
1213
- [API](#api)
1314
- [Content Identifiers](#content-identifiers)
@@ -31,15 +32,24 @@
3132
- [Multiaddrs](#multiaddrs)
3233
- [`isIPFS.multiaddr(addr)`](#isipfsmultiaddraddr)
3334
- [`isIPFS.peerMultiaddr(addr)`](#isipfspeermultiaddraddr)
35+
- [API Docs](#api-docs)
3436
- [License](#license)
35-
- [Contribute](#contribute)
37+
- [Contribution](#contribution)
3638

3739
## Install
3840

3941
```console
4042
$ npm i is-ipfs
4143
```
4244

45+
### Browser `<script>` tag
46+
47+
Loading this module through a script tag will make it's exports available as `IsIpfs` in the global namespace.
48+
49+
```html
50+
<script src="https://unpkg.com/is-ipfs/dist/index.min.js"></script>
51+
```
52+
4353
## Usage
4454

4555
```javascript
@@ -224,13 +234,17 @@ Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multif
224234

225235
Returns `true` if the provided `string`, [`Multiaddr`](https://github.com/multiformats/js-multiaddr) or `Uint8Array` represents a valid libp2p peer multiaddr (matching [`P2P` format from `mafmt`](https://github.com/multiformats/js-mafmt#api)) or `false` otherwise.
226236

237+
## API Docs
238+
239+
- <https://ipfs-shipyard.github.io/is-ipfs>
240+
227241
## License
228242

229243
Licensed under either of
230244

231245
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
232246
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
233247

234-
## Contribute
248+
## Contribution
235249

236250
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"types": "./dist/src/index.d.ts",
2828
"files": [
2929
"src",
30-
"dist/src",
30+
"dist",
3131
"!dist/test",
3232
"!**/*.tsbuildinfo"
3333
],
@@ -141,7 +141,8 @@
141141
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
142142
"test:node": "aegir test -t node",
143143
"test:electron-main": "aegir test -t electron-main",
144-
"release": "aegir release"
144+
"release": "aegir release",
145+
"docs": "aegir docs"
145146
},
146147
"dependencies": {
147148
"@multiformats/mafmt": "^11.0.3",
@@ -151,7 +152,7 @@
151152
"uint8arrays": "^4.0.2"
152153
},
153154
"devDependencies": {
154-
"aegir": "^37.5.3"
155+
"aegir": "^37.10.1"
155156
},
156157
"browser": {
157158
"fs": false

0 commit comments

Comments
 (0)