Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 3bb5712

Browse files
committed
docs: update readme
1 parent 8a5c994 commit 3bb5712

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,33 @@
33
[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
44
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
55
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-floodsub.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-floodsub)
6-
[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-floodsub/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-floodsub/actions/workflows/js-test-and-release.yml)
6+
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-floodsub/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-floodsub/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
77

88
> libp2p-floodsub, also known as pubsub-flood or just dumbsub, this implementation of pubsub focused on delivering an API for Publish/Subscribe, but with no CastTree Forming (it just floods the network).
99
1010
## Table of contents <!-- omit in toc -->
1111

1212
- [Install](#install)
13+
- [Browser `<script>` tag](#browser-script-tag)
1314
- [Don't use this module](#dont-use-this-module)
1415
- [Usage](#usage)
1516
- [License](#license)
16-
- [Contribute](#contribute)
17+
- [Contribution](#contribution)
1718

1819
## Install
1920

2021
```console
2122
$ npm i @libp2p/floodsub
2223
```
2324

25+
### Browser `<script>` tag
26+
27+
Loading this module through a script tag will make it's exports available as `Libp2pFloodsub` in the global namespace.
28+
29+
```html
30+
<script src="https://unpkg.com/@libp2p/floodsub/dist/index.min.js"></script>
31+
```
32+
2433
## Don't use this module
2534

2635
This module is a naive implementation of pubsub. It broadcasts all messages to all network peers, cannot provide older messages and has no protection against bad actors.
@@ -56,6 +65,6 @@ Licensed under either of
5665
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
5766
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
5867

59-
## Contribute
68+
## Contribution
6069

6170
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

+1-1
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
],

0 commit comments

Comments
 (0)