Skip to content

Commit 9f27ac2

Browse files
committed
Updates README.
1 parent 3638a95 commit 9f27ac2

File tree

1 file changed

+38
-42
lines changed

1 file changed

+38
-42
lines changed

README.md

+38-42
Original file line numberDiff line numberDiff line change
@@ -41,48 +41,20 @@ This is the implementation of the [IPFS repo spec](https://github.com/ipfs/specs
4141
└───────────┘ └───────────┘ └───────────┘ └───────────┘ └───────────┘ └───────────┘
4242
```
4343

44-
IPFS repo exposes a well defined interface by the Repo Spec. Each of the individual repos has an interface defined by [abstract-blob-store](https://github.com/maxogden/abstract-blob-store), this enables us to make IPFS repo portable (running on Node.js vs the browser) and accept different types of storage mechanisms for each repo (fs, levelDB, etc).
44+
This provides a well defined interface for creating and interacting with an IPFS
45+
Repo backed by a group of abstract backends for keys, configuration, logs, and
46+
more. Each of the individual repos has an interface defined by
47+
[abstract-blob-store](https://github.com/maxogden/abstract-blob-store): this
48+
enables us to make IPFS Repo portable (running on Node.js vs the browser) and
49+
accept different types of storage mechanisms for each repo (fs, levelDB, etc).
4550

4651
## Good to know (historical context)
4752

4853
- The datastore folder holds the legacy version of datastore, still built in levelDB, there is a current endeavour of pushing it to fs completely.
4954
- The blocks folder is the current version of datastore.
5055
- The keys repo doesn't exist yet, as the private key is simply stored inside config
5156

52-
# Installation
53-
54-
## npm
55-
56-
```sh
57-
> npm i ipfs-repo
58-
```
59-
60-
## Use in Node.js
61-
62-
```JavaScript
63-
var IPFSRepo = require('ipfs-repo')
64-
```
65-
66-
## Use in a browser with browserify, webpack or any other bundler
67-
68-
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
69-
70-
```JavaScript
71-
var IPFSRepo = require('ipfs-repo')
72-
```
73-
74-
## Use in a browser Using a script tag
75-
76-
Loading this module through a script tag will make the `Unixfs` obj available in the global namespace.
77-
78-
```html
79-
<script src="https://npmcdn.com/ipfs-repo/dist/index.min.js"></script>
80-
<!-- OR -->
81-
<script src="https://npmcdn.com/ipfs-repo/dist/index.js"></script>
82-
```
83-
84-
85-
# Usage
57+
# Example
8658

8759
```js
8860
var fsBlobStore = require('fs-blob-store') // an in-memory blob store
@@ -152,18 +124,42 @@ Read and write buffers to/from the repo's block store.
152124

153125
**WIP**
154126

155-
## Install
127+
# Installation
156128

157-
Install via npm:
129+
## npm
158130

159-
```bash
160-
$ npm i ipfs-repo
131+
```sh
132+
> npm i ipfs-repo
133+
```
134+
135+
## Use in Node.js
136+
137+
```JavaScript
138+
var IPFSRepo = require('ipfs-repo')
139+
```
140+
141+
## Use in a browser with browserify, webpack or any other bundler
142+
143+
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
144+
145+
```JavaScript
146+
var IPFSRepo = require('ipfs-repo')
147+
```
148+
149+
## Use in a browser Using a script tag
150+
151+
Loading this module through a script tag will make the `Unixfs` obj available in the global namespace.
152+
153+
```html
154+
<script src="https://npmcdn.com/ipfs-repo/dist/index.min.js"></script>
155+
<!-- OR -->
156+
<script src="https://npmcdn.com/ipfs-repo/dist/index.js"></script>
161157
```
162158

163159
## Contribute
164160

165161
There are some ways you can make this module better:
166162

167-
- Consult our open issues and take on one of them
168-
- Make the tests better
169-
- Make the tests work in the Browser
163+
- Consult our [open issues](https://github.com/ipfs/js-ipfs-repo/issues) and take on one of them
164+
- Help our tests reach 100% coverage!
165+

0 commit comments

Comments
 (0)