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

Commit c2fe4ad

Browse files
committed
chore: update readmes
1 parent 2d54fa2 commit c2fe4ad

File tree

22 files changed

+254
-33
lines changed

22 files changed

+254
-33
lines changed

examples/browser-add-readable-stream/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,17 @@ If you have a number of files that you'd like to add to IPFS and end up with a h
44

55
But what if you don't know how many there will be in advance? You can add multiple files to a directory in IPFS over time by using [`ipfs.addReadableStream`](https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/SPEC/FILES.md#addreadablestream).
66

7-
See `index.js` for a working example and open `index.html` in your browser to see it run.
7+
## Before you start
8+
9+
First clone this repo, install dependencies in the project root and build the project.
10+
11+
```console
12+
$ git clone https://github.com/ipfs/js-ipfs.git
13+
$ cd js-ipfs
14+
$ npm install
15+
$ npm run build
16+
```
17+
18+
## Running the example
19+
20+
See [`index.js`](./index.js) for a working example and open [`index.html`](./index.html) in your browser to see it run.

examples/browser-browserify/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22

33
In this example, you will find a boilerplate you can use to guide yourself into bundling js-ipfs with [browserify](http://browserify.org/), so that you can use it in your own web app!
44

5-
## Run this example
5+
## Before you start
66

7-
First install dependencies in the project root directory with `npm install`. Then in this directory run:
7+
First clone this repo, install dependencies in the project root and build the project.
8+
9+
```console
10+
$ git clone https://github.com/ipfs/js-ipfs.git
11+
$ cd js-ipfs
12+
$ npm install
13+
$ npm run build
14+
```
15+
16+
## Running the example
17+
18+
In this directory run:
819

920
```bash
1021
> npm start

examples/browser-create-react-app/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ It boots up a js-ipfs instance via a custom React hook in `./src/hooks/use-ipfs-
88

99
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). **v2.1.3**
1010

11+
## Before you start
12+
13+
First clone this repo, install dependencies in the project root and build the project.
14+
15+
```console
16+
$ git clone https://github.com/ipfs/js-ipfs.git
17+
$ cd js-ipfs
18+
$ npm install
19+
$ npm run build
20+
```
21+
1122
## Available Scripts
1223

1324
In the project directory, you can run:

examples/browser-mfs/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@ This demo allows you to upload files from your computer and use them to explore
88

99
![screenshot](screenshot_2.png)
1010

11-
## Running the demo
11+
## Before you start
1212

13-
Fork and clone this repo.
13+
First clone this repo, install dependencies in the project root and build the project.
14+
15+
```console
16+
$ git clone https://github.com/ipfs/js-ipfs.git
17+
$ cd js-ipfs
18+
$ npm install
19+
$ npm run build
20+
```
21+
22+
## Running the example
1423

1524
Navigate into this directory:
1625

examples/browser-parceljs/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ that you can follow it for creating Parcel.js bundled js-ipfs DApps.
66

77
## Before you start
88

9+
First clone this repo, install dependencies in the project root and build the project.
10+
11+
```console
12+
$ git clone https://github.com/ipfs/js-ipfs.git
13+
$ cd js-ipfs
14+
$ npm install
15+
$ npm run build
16+
```
17+
18+
## Running the example
19+
920
1. Start your IPFS daemon of choice e.g. `ipfs daemon` (optional if you do not
1021
want to serve the example over IPFS)
1122
1. Open a new terminal

examples/browser-readablestream/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@ We can use the execllent [`videostream`](https://www.npmjs.com/package/videostre
44

55
Take a look at [`index.js`](./index.js) to see a working example.
66

7-
## Running the demo
7+
## Before you start
8+
9+
First clone this repo, install dependencies in the project root and build the project.
10+
11+
```console
12+
$ git clone https://github.com/ipfs/js-ipfs.git
13+
$ cd js-ipfs
14+
$ npm install
15+
$ npm run build
16+
```
17+
18+
## Running the example
819

920
In this directory:
1021

examples/browser-script-tag/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,17 @@ You can use IPFS in your in-browser JavaScript code with just a `<script>` tag.
88

99
This exposes a global `Ipfs`; you can get a node by making a `new Ipfs()`.
1010

11+
## Before you start
12+
13+
First clone this repo, install dependencies in the project root and build the project.
14+
15+
```console
16+
$ git clone https://github.com/ipfs/js-ipfs.git
17+
$ cd js-ipfs
18+
$ npm install
19+
$ npm run build
20+
```
21+
22+
## Running the example
23+
1124
See `index.html` for a working example.

examples/browser-video-streaming/README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,33 @@ In order for any of the above to be useful, we also need to have a way to actual
2828

2929
For example, say we have a directory containing a video file `BigBuckBunny_320x180.mp4`. We can then create a sub directory and generate the HLS data there, and finally add it to IPFS:
3030

31-
```bash
32-
> mkdir hls-bunny
33-
> cd hls-bunny
34-
> ffmpeg -i ../BigBuckBunny_320x180.mp4 -profile:v baseline -level 3.0 -start_number 0 -hls_time 5 -hls_list_size 0 -f hls master.m3u8
35-
> ipfs add -Qr .
31+
```console
32+
$ mkdir hls-bunny
33+
$ cd hls-bunny
34+
$ ffmpeg -i ../BigBuckBunny_320x180.mp4 -profile:v baseline -level 3.0 -start_number 0 -hls_time 5 -hls_list_size 0 -f hls master.m3u8
35+
$ ipfs add -Qr .
3636
```
3737

3838
The most important piece of information to note down is the name you choose for the HLS manifest (master.m3u8 in this example, but you're free to use any name), and the hash returned by `ipfs add`. Consult [streaming.js](streaming.js) for a full example of how these values are used.
3939

40-
## Putting it all together
40+
## Before you start
41+
42+
First clone this repo, install dependencies in the project root and build the project.
43+
44+
```console
45+
$ git clone https://github.com/ipfs/js-ipfs.git
46+
$ cd js-ipfs
47+
$ npm install
48+
$ npm run build
49+
```
50+
51+
## Running the example
4152

4253
*Note:* If you try to run the example straight from disk, some browsers (e.g Chrome) might, for security reasons, prevent some resources from loading correctly. To get around this, simply cd into the directory of this example and use http-server from npm:
4354

44-
```bash
45-
> npm install -g http-server
46-
> http-server
55+
```console
56+
$ npm install -g http-server
57+
$ http-server
4758
```
4859

4960
You should then be able to stream Big Buck Bunny by pointing your browser at http://localhost:8080.

examples/browser-vue/README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,39 @@ A minimal demonstration of how to use `js-ipfs` with `Vue`.
66

77
This project was bootstrapped with [Vue CLI](https://cli.vuejs.org/).
88

9+
## Before you start
10+
11+
First clone this repo, install dependencies in the project root and build the project.
12+
13+
```console
14+
$ git clone https://github.com/ipfs/js-ipfs.git
15+
$ cd js-ipfs
16+
$ npm install
17+
$ npm run build
18+
```
19+
920
### Compiles and hot-reloads for development
1021

11-
```bash
12-
npm run serve
22+
```console
23+
$ npm run serve
1324
```
1425

1526
### Compiles and minifies for production
1627

17-
```bash
18-
npm run build
28+
```console
29+
$ npm run build
1930
```
2031

2132
### Run your tests
2233

23-
```bash
24-
npm run test
34+
```console
35+
$ npm run test
2536
```
2637

2738
### Lints and fixes files
2839

29-
```bash
30-
npm run lint
40+
```console
41+
$ npm run lint
3142
```
3243

3344
### Customize configuration

examples/browser-webpack/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@
22

33
> In this example, you will find a boilerplate you can use to guide yourself into bundling js-ipfs with webpack, so that you can use it in your own web app!
44
5-
## Run this example
5+
## Before you start
6+
7+
First clone this repo, install dependencies in the project root and build the project.
8+
9+
```console
10+
$ git clone https://github.com/ipfs/js-ipfs.git
11+
$ cd js-ipfs
12+
$ npm install
13+
$ npm run build
14+
```
15+
16+
## Running the example
617

718
Once the daemon is on, run the following command within this folder:
819

920
```bash
10-
> npm start
21+
$ npm start
1122
```
1223

1324
Now open your browser at `http://localhost:3000`

examples/circuit-relaying/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,19 @@ Here's what we are going to be doing, today:
101101

102102
Let's go.
103103

104+
## Before you start
105+
106+
First clone this repo, install dependencies in the project root and build the project.
107+
108+
```console
109+
$ git clone https://github.com/ipfs/js-ipfs.git
110+
$ cd js-ipfs
111+
$ npm install
112+
$ npm run build
113+
```
114+
115+
## Running the example
116+
104117
### 1. Set up
105118

106119
You'll need to have an implementation of IPFS running on your machine. Currently, this means either go-ipfs or js-ipfs.

examples/custom-ipfs-repo/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@ This example shows you how to customize your repository, including where your da
77

88
You can find full details on customization in the [IPFS Repo Docs](https://github.com/ipfs/js-ipfs-repo#setup).
99

10-
## Run this example
10+
## Before you start
11+
12+
First clone this repo, install dependencies in the project root and build the project.
13+
14+
```console
15+
$ git clone https://github.com/ipfs/js-ipfs.git
16+
$ cd js-ipfs
17+
$ npm install
18+
$ npm run build
19+
```
20+
21+
## Running the example
1122

1223
```
1324
> npm start

examples/custom-libp2p/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
This example shows you how to make full use of the ipfs configuration to create a libp2p bundle function. As IPFS applications become more complex, their needs for a custom libp2p bundle also grow. Instead of fighting with configuration options, you can use your own libp2p bundle function to get exactly what you need.
44

5-
## Run this example
5+
## Before you start
6+
7+
First clone this repo, install dependencies in the project root and build the project.
8+
9+
```console
10+
$ git clone https://github.com/ipfs/js-ipfs.git
11+
$ cd js-ipfs
12+
$ npm install
13+
$ npm run build
14+
```
15+
16+
## Running the example
617

718
Running this example should result in metrics being logged out to the console every few seconds.
819

examples/exchange-files-in-browser/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ Here's what we are going to be doing:
4242

4343
Just follow the instructions below and it will be up and running in no time!
4444

45+
## Before you start
46+
47+
First clone this repo, install dependencies in the project root and build the project.
48+
49+
```console
50+
$ git clone https://github.com/ipfs/js-ipfs.git
51+
$ cd js-ipfs
52+
$ npm install
53+
$ npm run build
54+
```
55+
56+
## Running the example
57+
4558
### 1. Install `go-ipfs` or `js-ipfs`
4659

4760
If you already have `go-ipfs` or `js-ipfs` installed in your machine, you can skip this step. Otherwise, read on.

examples/explore-ethereum-blockchain/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
> This is a pre-example to a full Ethereum to IPFS bridge. It shows how to resolve Ethereum hashes through the IPFS DAG get API.
44
5-
## Set up
5+
## Before you start
6+
7+
First clone this repo, install dependencies in the project root and build the project.
8+
9+
```console
10+
$ git clone https://github.com/ipfs/js-ipfs.git
11+
$ cd js-ipfs
12+
$ npm install
13+
$ npm run build
14+
```
15+
16+
## Running the example
617

718
Make sure to have the latest js-ipfs installed by doing
819

examples/ipfs-101/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ In this tutorial, we go through spawning an IPFS node, adding a file and cat'ing
66

77
You can find a complete version of this tutorial in [1.js](./1.js). For this tutorial, you need to install `ipfs` using `npm install ipfs`.
88

9+
## Before you start
10+
11+
First clone this repo, install dependencies in the project root and build the project.
12+
13+
```console
14+
$ git clone https://github.com/ipfs/js-ipfs.git
15+
$ cd js-ipfs
16+
$ npm install
17+
$ npm run build
18+
```
19+
20+
## Running the example
21+
922
Creating an IPFS instance can be done in one line, after requiring the module, you simply have to:
1023

1124
```js

examples/run-in-electron/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
> This example is heavily inspired by [electron-quick-start](https://github.com/electron/electron-quick-start).
44
5+
## Before you start
6+
7+
First clone this repo, install dependencies in the project root and build the project.
8+
9+
```console
10+
$ git clone https://github.com/ipfs/js-ipfs.git
11+
$ cd js-ipfs
12+
$ npm install
13+
$ npm run build
14+
```
15+
16+
## Running the example
17+
518
To try it by yourself, do:
619

720
```

0 commit comments

Comments
 (0)