From 621712de1407dc6ee06f026daed3a7c5e03a05ed Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Fri, 16 Dec 2022 18:47:49 +0000 Subject: [PATCH] docs: publish api docs (#112) Update project config to publish api docs --- .gitignore | 69 ++++------------------------------------------------ README.md | 20 ++++++++++++--- package.json | 16 ++++++------ 3 files changed, 30 insertions(+), 75 deletions(-) diff --git a/.gitignore b/.gitignore index 230dfd8..1531bdf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,65 +1,6 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Build Documentation -docs - -# Dependency directories -node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -yarn.lock +node_modules +dist +.docs +.coverage package-lock.json -dist/ +yarn.lock diff --git a/README.md b/README.md index 6d914c7..6130323 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,19 @@ [![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-delegated-content-routing.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-delegated-content-routing) -[![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-delegated-content-routing/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-delegated-content-routing/actions/workflows/js-test-and-release.yml) +[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/js-libp2p-delegated-content-routing/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/js-libp2p-delegated-content-routing/actions/workflows/js-test-and-release.yml?query=branch%3Amaster) > Leverage other peers in the libp2p network to perform Content Routing calls. ## Table of contents - [Install](#install) + - [Browser ` +``` + Leverage other peers in the network to perform Content Routing calls. Requires access to `/api/v0/dht/findprovs` and `/api/v0/refs` HTTP API endpoints of the delegate node. @@ -61,6 +71,10 @@ for await (const provider of node.contentRouting.findProviders('cid')) { } ``` +## API Docs + +- + ## License Licensed under either of @@ -68,6 +82,6 @@ Licensed under either of - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](LICENSE-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. diff --git a/package.json b/package.json index 4278351..e4e3c88 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "types": "./dist/src/index.d.ts", "files": [ "src", - "dist/src", + "dist", "!dist/test", "!**/*.tsbuildinfo" ], @@ -132,7 +132,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/interface-content-routing": "^1.0.2", @@ -142,19 +143,18 @@ "@libp2p/logger": "^2.0.1", "any-signal": "^3.0.1", "err-code": "^3.0.1", - "it-drain": "^1.0.5", + "it-drain": "^2.0.0", "multiformats": "^10.0.0", "p-defer": "^4.0.0", "p-queue": "^7.2.0" }, "devDependencies": { "aegir": "^37.5.3", - "go-ipfs": "^0.16.0", - "ipfs-core-types": "^0.12.0", - "ipfs-http-client": "^58.0.0", + "go-ipfs": "^0.17.0", + "ipfs-core-types": "^0.13.0", + "ipfs-http-client": "^59.0.0", "ipfsd-ctl": "^12.0.2", - "it-all": "^1.0.6", - "it-drain": "^1.0.5", + "it-all": "^2.0.0", "timeout-abort-controller": "^3.0.0", "uint8arrays": "^4.0.2", "wherearewe": "^2.0.1"