Skip to content

Commit

Permalink
docs: publish api docs (#113)
Browse files Browse the repository at this point in the history
Update project config to publish api docs
  • Loading branch information
achingbrain authored Dec 16, 2022
1 parent e4d74cf commit bc20def
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
node_modules
coverage
.nyc_output
dist
.docs
.coverage
package-lock.json
yarn.lock
docs
dist
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,33 @@
[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-pubsub.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-pubsub)
[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-pubsub/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-pubsub/actions/workflows/js-test-and-release.yml)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-pubsub/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-pubsub/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> libp2p pubsub base class
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [Usage](#usage)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute)
- [Contribution](#contribution)

## Install

```console
$ npm i @libp2p/pubsub
```

### Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `Libp2pPubsub` in the global namespace.

```html
<script src="https://unpkg.com/@libp2p/pubsub/dist/index.min.js"></script>
```

## Usage

```console
Expand All @@ -34,13 +44,17 @@ class MyPubsubImplementation extends PubSubBaseProtocol {
}
```

## API Docs

- <https://libp2p.github.io/js-libp2p-pubsub>

## License

Licensed under either of

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

## Contribute
## Contribution

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.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"files": [
"src",
"dist/src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
Expand Down Expand Up @@ -173,7 +173,8 @@
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
"release": "aegir release"
"release": "aegir release",
"docs": "aegir docs"
},
"dependencies": {
"@libp2p/crypto": "^1.0.0",
Expand Down Expand Up @@ -206,7 +207,7 @@
"p-wait-for": "^5.0.0",
"protons": "^6.0.0",
"protons-runtime": "^4.0.1",
"sinon": "^14.0.0",
"sinon": "^15.0.1",
"util": "^0.12.4"
}
}

0 comments on commit bc20def

Please sign in to comment.