From b4f88e7bfbe865eb00cfb1d99a4231b072b458a5 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 15 Dec 2022 09:49:40 +0000 Subject: [PATCH] fix: publish tsdocs for this module (#236) Publishes docs to gh-pages with links to external modules --- .gitignore | 3 +-- README.md | 53 +++++----------------------------------------------- package.json | 7 ++++--- 3 files changed, 10 insertions(+), 53 deletions(-) diff --git a/.gitignore b/.gitignore index 2df8b474dc..f7c8504a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,5 @@ node_modules package-lock.json coverage .nyc_output -docs - +.docs dist diff --git a/README.md b/README.md index d9d95f2bc9..e956f13b5d 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,15 @@ [![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 - [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 @@ -25,13 +21,6 @@ $ npm i @libp2p/tcp ``` -[![](https://github.com/raw/libp2p/js-libp2p-interfaces/master/src/transport/img/badge.png)](https://github.com/libp2p/js-libp2p-interfaces/tree/master/src/transport) -[![](https://github.com/raw/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 @@ -82,41 +71,9 @@ new connection opened Value: hello World! ``` -## API - -### Transport - -[![](https://github.com/raw/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://github.com/raw/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. +- ## License diff --git a/package.json b/package.json index 3963837a0a..91b101b605 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -28,7 +28,7 @@ "types": "./dist/src/index.d.ts", "files": [ "src", - "dist/src", + "dist", "!dist/test", "!**/*.tsbuildinfo" ], @@ -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", @@ -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",