Skip to content

Commit

Permalink
docs: publish api docs (#112)
Browse files Browse the repository at this point in the history
Update project config to publish api docs
  • Loading branch information
achingbrain authored Dec 16, 2022
1 parent 55d0ab3 commit 621712d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 75 deletions.
69 changes: 5 additions & 64 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,34 @@
[![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 <!-- omit in toc -->

- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [Requirements](#requirements)
- [Example](#example)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute)
- [Contribution](#contribution)

## Install

```console
$ npm i @libp2p/delegated-content-routing
```

### Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `Libp2pDelegatedContentRouting` in the global namespace.

```html
<script src="https://unpkg.com/@libp2p/delegated-content-routing/dist/index.min.js"></script>
```

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.
Expand Down Expand Up @@ -61,13 +71,17 @@ for await (const provider of node.contentRouting.findProviders('cid')) {
}
```

## API Docs

- <https://libp2p.github.io/js-libp2p-delegated-content-routing>

## License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/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.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"types": "./dist/src/index.d.ts",
"files": [
"src",
"dist/src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
Expand Down Expand Up @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit 621712d

Please sign in to comment.