From 2c1340b6eeca5fb17d0c7812a1f23c5024de0584 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Wed, 17 Aug 2016 02:08:48 +0300 Subject: [PATCH] =?UTF-8?q?update=20the=20`script`=20tag=20in=C2=A0an?= =?UTF-8?q?=C2=A0example=20provided=C2=A0by=20`README.md`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c8c7da4283..c8486954cf 100644 --- a/README.md +++ b/README.md @@ -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 ` -``` +The last published version of the package becomes available on [npmcdn](https://npmcdn.com/) and thus you may use it as the source: + +* loading the minified version + + ```html + + ``` + +* loading the human-readable (not minified) version + + ```html + + ``` ## Usage