Skip to content

Commit

Permalink
chore: configure publishConfig and aegir check-project
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Aug 31, 2023
1 parent f3bf6ec commit 1fb7c39
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 11 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [Documentation](#documentation)
- [Create remote pinner](#create-remote-pinner)
- [Add a pin](#add-a-pin)
- [Replace a pin](#replace-a-pin)
- [Lead Maintainer](#lead-maintainer)
- [Contributing](#contributing)
- [License](#license)
Expand All @@ -22,6 +26,14 @@
$ npm i @helia/remote-pinning
```

### Browser `<script>` tag

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

```html
<script src="https://unpkg.com/@helia/remote-pinning/dist/index.min.js"></script>
```

## Documentation

### Create remote pinner
Expand Down Expand Up @@ -52,6 +64,7 @@ const addPinResult = await remotePinner.addPin({
name: 'helloWorld'
})
```

### Replace a pin

```typescript
Expand Down
41 changes: 30 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,28 @@
],
"type": "module",
"types": "./dist/src/index.d.ts",
"typesVersions": {
"*": {
"*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
],
"src/*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
]
}
},
"files": [
"src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"sourceType": "module"
}
},
"exports": {
".": {
"types": "./dist/src/index.d.ts",
Expand All @@ -40,6 +50,12 @@
"import": "./dist/src/errors.js"
}
},
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"sourceType": "module"
}
},
"release": {
"branches": [
"main"
Expand Down Expand Up @@ -141,6 +157,12 @@
"build": "aegir build",
"release": "aegir release"
},
"dependencies": {
"@libp2p/logger": "^3.0.2",
"@multiformats/multiaddr": "^12.1.6",
"multiformats": "^12.0.1",
"p-retry": "^6.0.0"
},
"devDependencies": {
"@helia/interface": "^1.2.2",
"@helia/unixfs": "^1.4.1",
Expand All @@ -156,10 +178,7 @@
"@ipfs-shipyard/pinning-service-client": "^1.0.3",
"helia": "^1.3.11"
},
"dependencies": {
"@libp2p/logger": "^3.0.2",
"@multiformats/multiaddr": "^12.1.6",
"multiformats": "^12.0.1",
"p-retry": "^6.0.0"
"publishConfig": {
"access": "public"
}
}
6 changes: 6 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"entryPoints": [
"./src/index.ts",
"./src/errors.ts"
]
}

0 comments on commit 1fb7c39

Please sign in to comment.