Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix: publish tsdocs for this module (#236)
Browse files Browse the repository at this point in the history
Publishes docs to gh-pages with links to external modules
  • Loading branch information
achingbrain authored Dec 15, 2022
1 parent 01fe00f commit b4f88e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 53 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ node_modules
package-lock.json
coverage
.nyc_output
docs

.docs
dist
53 changes: 5 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,22 @@
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-tcp.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-tcp)
[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-tcp/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-tcp/actions/workflows/js-test-and-release.yml)

> Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces
> A TCP transport for libp2p
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [Transport](#transport)
- [Connection](#connection)
- [Contribute](#contribute)
- [Contribute](#contribute-1)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute-2)
- [Contribute](#contribute)

## Install

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

[![](https://raw.githubusercontent.com/libp2p/js-libp2p-interfaces/master/src/transport/img/badge.png)](https://github.com/libp2p/js-libp2p-interfaces/tree/master/src/transport)
[![](https://raw.githubusercontent.com/libp2p/js-libp2p-interfaces/master/src/connection/img/badge.png)](https://github.com/libp2p/js-libp2p-interfaces/tree/master/src/connection)

```sh
> npm install @libp2p/tcp
```

## Usage

```js
Expand Down Expand Up @@ -82,41 +71,9 @@ new connection opened
Value: hello World!
```

## API

### Transport

[![](https://raw.githubusercontent.com/libp2p/js-libp2p-interfaces/master/packages/libp2p-interfaces/src/transport/img/badge.png)](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/transport)

`@libp2p/tcp` accepts TCP addresses as both IPFS and non IPFS encapsulated addresses, i.e:

`/ip4/127.0.0.1/tcp/4001`
`/ip4/127.0.0.1/tcp/4001/ipfs/QmHash`

(both for dialing and listening)

### Connection

[![](https://raw.githubusercontent.com/libp2p/js-libp2p-interfaces/master/packages/libp2p-interfaces/src/connection/img/badge.png)](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/connection)

## Contribute

Contributions are welcome! The libp2p implementation in JavaScript is a work in progress. As such, there's a few things you can do right now to help out:

- [Check out the existing issues](//github.com/libp2p/js-libp2p-tcp/issues).
- **Perform code reviews**.
- **Add tests**. There can never be enough tests.

Please be aware that all interactions related to libp2p are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## Contribute

The libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out:
## API Docs

- Go through the modules and **check out existing issues**. This is especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
- <https://libp2p.github.io/js-libp2p-tcp>

## License

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@libp2p/tcp",
"version": "6.0.6",
"description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces",
"description": "A TCP transport for libp2p",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/libp2p/js-libp2p-tcp#readme",
"repository": {
Expand All @@ -28,7 +28,7 @@
"types": "./dist/src/index.d.ts",
"files": [
"src",
"dist/src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
Expand Down Expand Up @@ -134,6 +134,7 @@
"lint": "aegir lint",
"dep-check": "aegir dep-check",
"build": "aegir build",
"docs": "aegir docs",
"test": "aegir test -t node -t electron-main",
"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
Expand All @@ -154,7 +155,7 @@
"devDependencies": {
"@libp2p/interface-mocks": "^8.0.1",
"@libp2p/interface-transport-compliance-tests": "^3.0.0",
"aegir": "^37.5.3",
"aegir": "^37.7.3",
"it-all": "^2.0.0",
"it-pipe": "^2.0.3",
"p-defer": "^4.0.0",
Expand Down

0 comments on commit b4f88e7

Please sign in to comment.