Skip to content

Commit bdbf402

Browse files
authored
docs: update project config to publish api docs (libp2p#45)
Updates project config to publish api docs
1 parent d1613b1 commit bdbf402

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

.gitignore

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
node_modules
2-
package-lock.json
3-
coverage
4-
.coverage
5-
.nyc_output
6-
docs
72
dist
3+
.docs
4+
.coverage
5+
package-lock.json
6+
yarn.lock
87

98
go-libp2p-webtransport-server/main

README.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,38 @@
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-webtransport.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-webtransport)
6-
[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-webtransport/test%20&%20maybe%20release/main?style=flat-square)](https://github.com/libp2p/js-libp2p-webtransport/actions/workflows/js-test-and-release.yml)
6+
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-webtransport/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/libp2p/js-libp2p-webtransport/actions/workflows/js-test-and-release.yml?query=branch%3Amain)
77

88
> JavaScript implementation of the WebTransport module that libp2p uses and that implements the interface-transport spec
99
1010
## Table of contents <!-- omit in toc -->
1111

1212
- [Install](#install)
13+
- [Browser `<script>` tag](#browser-script-tag)
1314
- [Description](#description)
1415
- [Usage](#usage)
1516
- [Libp2p Usage Example](#libp2p-usage-example)
1617
- [API](#api)
1718
- [Transport](#transport)
1819
- [Connection](#connection)
20+
- [API Docs](#api-docs)
1921
- [License](#license)
20-
- [Contribute](#contribute)
22+
- [Contribution](#contribution)
2123

2224
## Install
2325

2426
```console
2527
$ npm i @libp2p/webtransport
2628
```
2729

30+
### Browser `<script>` tag
31+
32+
Loading this module through a script tag will make it's exports available as `Libp2pWebtransport` in the global namespace.
33+
34+
```html
35+
<script src="https://unpkg.com/@libp2p/webtransport/dist/index.min.js"></script>
36+
```
37+
2838
[![](https://raw.githubusercontent.com/libp2p/interface-transport/master/img/badge.png)](https://github.com/libp2p/interface-transport)
2939
[![](https://raw.githubusercontent.com/libp2p/interface-connection/master/img/badge.png)](https://github.com/libp2p/interface-connection)
3040

@@ -67,13 +77,17 @@ For more information see [libp2p/js-libp2p/doc/CONFIGURATION.md#customizing-tran
6777

6878
[![](https://raw.githubusercontent.com/libp2p/interface-connection/master/img/badge.png)](https://github.com/libp2p/interface-connection)
6979

80+
## API Docs
81+
82+
- <https://libp2p.github.io/js-libp2p-webtransport>
83+
7084
## License
7185

7286
Licensed under either of
7387

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

77-
## Contribute
91+
## Contribution
7892

7993
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

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"files": [
4040
"src",
41-
"dist/src",
41+
"dist",
4242
"!dist/test",
4343
"!**/*.tsbuildinfo"
4444
],
@@ -150,7 +150,8 @@
150150
"build": "aegir build",
151151
"test": "aegir test -t browser",
152152
"test:chrome": "aegir test -t browser --cov",
153-
"release": "aegir release"
153+
"release": "aegir release",
154+
"docs": "aegir docs"
154155
},
155156
"dependencies": {
156157
"@chainsafe/libp2p-noise": "^11.0.0",

0 commit comments

Comments
 (0)