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

Update the Readme + add Circle #6

Merged
merged 1 commit into from
Apr 8, 2016
Merged
Show file tree
Hide file tree
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
41 changes: 35 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ IPFS Blocks JavaScript Implementation
[![](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)
![](https://img.shields.io/badge/coverage-?%25-yellow.svg?style=flat-square)
[![Travis CI](https://travis-ci.org/ipfs/js-ipfs-blocks.svg?branch=master)](https://travis-ci.org/ipfs/js-ipfs-blocks)
[![Circle CI](https://circleci.com/gh/ipfs/js-ipfs-blocks.svg?style=svg)](https://circleci.com/gh/ipfs/js-ipfs-blocks)
![](https://img.shields.io/badge/coverage-77-yellow.svg?style=flat-square)
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-blocks.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-blocks)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)

Expand All @@ -28,15 +30,42 @@ IPFS Blocks JavaScript Implementation

A Block is a data structure available on this module.

## Usage
# Installation

```bash
$ npm i ipfs-blocks
## npm

```sh
> npm i ipfs-blocks
```

```javascript
const ipfsBlocks = require('ipfs-blocks')
## Use in Node.js

```JavaScript
var ipfsBlocks = require('ipfs-blocks')
```

## Use in a browser with browserify, webpack or any other bundler

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.

```JavaScript
var ipfsBlocks = require('ipfs-blocks')
```

## Use in a browser Using a script tag

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

```html
<script src="https://npmcdn.com/ipfs-blocks/dist/index.min.js"></script>
<!-- OR -->
<script src="https://npmcdn.com/ipfs-blocks/dist/index.js"></script>
```

# Usage


```javascript
// then, to access each of the components
ipfsBlocks.BlockService
ipfsBlocks.Block
Expand Down
3 changes: 3 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
machine:
node:
version: stable