Skip to content

Commit 6ef269b

Browse files
Merge pull request #11 from ipfs/feature/standardize-readme
Standardize README
2 parents 1b6f819 + 6909535 commit 6ef269b

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

README.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
ipfs-unixfs JavaScript Implementation
2-
=====================================
1+
# ipfs-unixfs JavaScript Implementation
32

43
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
4+
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
55
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
6+
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
67
[![Build Status](https://travis-ci.org/ipfs/js-ipfs-unixfs.svg?style=flat-square&branch=master)](https://travis-ci.org/ipfs/js-ipfs-unixfs)
78
[![Coverage Status](https://coveralls.io/repos/github/ipfs/js-ipfs-unixfs/badge.svg?branch=master)](https://coveralls.io/github/ipfs/js-ipfs-unixfs?branch=master)
89
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs)
@@ -12,29 +13,49 @@ ipfs-unixfs JavaScript Implementation
1213
1314
[The unixfs spec can be found inside the ipfs/specs repository](http://github.com/ipfs/specs)
1415

15-
# Installation
16-
17-
## npm
16+
## Table of Contents
17+
18+
- [Install](#install)
19+
- [npm](#npm)
20+
- [Use in Node.js](#use-in-nodejs)
21+
- [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler)
22+
- [Use in a browser Using a script tag](#use-in-a-browser-using-a-script-tag)
23+
- [Usage](#usage)
24+
- [Examples](#examples)
25+
- [Create a file composed by several blocks](#create-a-file-composed-by-several-blocks)
26+
- [Create a directory that contains several files](#create-a-directory-that-contains-several-files)
27+
- [API](#api)
28+
- [unixfs Data Structure](#unixfs-data-structure)
29+
- [create an unixfs Data element](#create-an-unixfs-data-element)
30+
- [add and remove a block size to the block size list](#add-and-remove-a-block-size-to-the-block-size-list)
31+
- [get total fileSize](#get-total-filesize)
32+
- [marshal and unmarshal](#marshal-and-unmarshal)
33+
- [Contribute](#contribute)
34+
- [License](#license)
35+
36+
## Install
37+
38+
### npm
1839

1940
```sh
2041
> npm i ipfs-unixfs
2142
```
2243

23-
## Use in Node.js
44+
### Use in Node.js
2445

2546
```JavaScript
2647
var Unixfs = require('ipfs-unixfs')
2748
```
2849

29-
## Use in a browser with browserify, webpack or any other bundler
50+
### Use in a browser with browserify, webpack or any other bundler
3051

3152
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.
3253

3354
```JavaScript
3455
var Unixfs = require('ipfs-unixfs')
3556
```
3657

37-
## Use in a browser Using a script tag
58+
### Use in a browser Using a script tag
3859

3960
Loading this module through a script tag will make the `Unixfs` obj available in the global namespace.
4061

@@ -44,9 +65,9 @@ Loading this module through a script tag will make the `Unixfs` obj available in
4465
<script src="https://npmcdn.com/ipfs-unixfs/dist/index.js"></script>
4566
```
4667

47-
# Usage
68+
## Usage
4869

49-
## Examples
70+
### Examples
5071

5172
#### Create a file composed by several blocks
5273

@@ -120,3 +141,16 @@ data.fileSize() // => size in bytes
120141
var marsheled = data.marshal()
121142
var unmarsheled = Unixfs.unmarshal(marsheled)
122143
```
144+
145+
## Contribute
146+
147+
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs/issues)!
148+
149+
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
150+
151+
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
152+
153+
## License
154+
155+
[MIT](LICENSE)
156+

0 commit comments

Comments
 (0)