Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Standardize README #48

Merged
merged 1 commit into from
Jun 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 41 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
IPFS unixFS Engine
===================

> Import & Export data to/from an IPFS [DAG Service][]
# IPFS unixFS Engine

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![Build Status](https://travis-ci.org/ipfs/js-ipfs-unixfs-engine.svg?style=flat-square)](https://travis-ci.org/ipfs/js-ipfs-unixfs-engine)
[![Coverage Status](https://coveralls.io/repos/github/ipfs/js-ipfs-unixfs-engine/badge.svg?branch=master)](https://coveralls.io/github/ipfs/js-ipfs-unixfs-engine?branch=master)
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-unixfs-engine.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs-engine)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)

## Example Importer
> JavaScript implementation of the layout and chunking mechanisms used by IPFS

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Example Importer](#example-importer)
- [Importer API](#importer-api)
- [const add = new Importer(dag)](#const-add--new-importerdag)
- [Example Exporter](#example-exporter)
- [Exporter: API](#exporter-api)
- [new Exporter(hash, dagService)](#new-exporterhash-dagservice)
- [Contribute](#contribute)
- [License](#license)

## Install

With [npm](https://npmjs.org/) installed, run

```
$ npm install ipfs-unixfs-engine
```

## Usage

### Example Importer

Let's create a little directory to import:
```sh
Expand Down Expand Up @@ -91,13 +115,13 @@ When run, the stat of DAG Node is outputted for each file on data event until th

```

## Importer API
### Importer API

```js
const Importer = require('ipfs-unixfs-engine').importer
```

### const add = new Importer(dag)
#### const add = new Importer(dag)

The importer is a object Transform stream that accepts objects of the form

Expand All @@ -116,7 +140,7 @@ The input's file paths and directory structure will be preserved in the DAG
Nodes.


## Example Exporter
### Example Exporter

```
const ipfsRepo = require('ipfs-repo')
Expand All @@ -139,7 +163,7 @@ exportEvent.on('data', (result) => {
}
```

## Exporter: API
### Exporter: API
```js
const Exporter = require('ipfs-unixfs-engine').exporter
```
Expand All @@ -163,19 +187,17 @@ Errors are received as with a normal stream, by listening on the `'error'` event
to be emitted.


## Install

With [npm](https://npmjs.org/) installed, run
[DAG Service]: https://github.com/vijayee/js-ipfs-merkle-dag/
[UnixFS]: https://github.com/ipfs/specs/tree/master/unixfs

```
$ npm install ipfs-unixfs-engine
```
## Contribute

## License
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs-engine/issues)!

ISC
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)

[DAG Service]: https://github.com/vijayee/js-ipfs-merkle-dag/
[UnixFS]: https://github.com/ipfs/specs/tree/master/unixfs
## License

[MIT](LICENSE)