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

Commit

Permalink
Merge pull request #6 from ipfs/update/readme+circle
Browse files Browse the repository at this point in the history
Update the Readme + add Circle
  • Loading branch information
daviddias committed Apr 8, 2016
2 parents 3099d06 + c5baa6b commit ee4d69b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
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

0 comments on commit ee4d69b

Please sign in to comment.