Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
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
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,27 @@ The CLI is available by using the command `jsipfs` in your terminal. This is ali

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 the asset management process.

```js
var ipfs = require('ipfs');
```

### Use in a browser using a script tag

Simply include ipfs in your bundled javascript file.
Loading this module in a browser (using a `<script>` tag) makes the `Ipfs` object available in the global namespace.

```html
<script type="text/javascript" src="assets/bundled.js"></script>
```
The last published version of the package become [available for download](https://npmcdn.com/ipfs/dist/) from [npmcdn](https://npmcdn.com/) and thus you may use it as the source:

* loading the minified version

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

* loading the human-readable (not minified) version

```html
<script src="https://npmcdn.com/ipfs/dist/index.js"></script>
```

## Usage

Expand Down