You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-24Lines changed: 37 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
<imgsrc="https://github.com/ipfs-shipyard/npm-on-ipfs/raw/master/img/npm-on-ipfs.jpg"alt="npm distributed on top of lots of connected IPFS nodes worldwide" />
> Install your favourite modules from the Distributed Web using IPFS. Have a cache always ready and share them in all your local networks.
14
+
**TLDR: npm-on-ipfs enables you to install your favourite modules from the distributed web using IPFS, as well as to have a cache always ready and shared on your local network — great for enterprise and community coding settings, or even just enabling more speedy work when you and your friends are working at a low-bandwidth coffee shop.**
15
15
16
-
## js-IPFS version
16
+
## Quick background
17
17
18
-
This module depends on features in [v0.34.0](https://github.com/ipfs/js-ipfs/releases/tag/v0.34.0) release of [js-ipfs](https://github.com/ipfs/js-ipfs).
18
+
As the largest software registry in the world, [npm](https://www.npmjs.com) is also the de facto package manager for the JavaScript ecosystem, with more than [900k](https://replicate.npmjs.com/_all_docs) packages and more than 7 billion downloads a week. It's incredibly fast and reliable — however, we couldn't stop ourselves from wondering what would happen if we put the world's largest registry on the distributed web.
19
19
20
-
Please ensure you are running at least that version of js-IPFS:
20
+
The result is npm-on-ipfs: a module that wraps your package manager of choice (npm or yarn) in configuration to use [IPFS](https://ipfs.io/), not HTTP, to retrieve your dependencies from the central npm registry. It's still a work in progress, but we think you'll find it useful and awesome for the following reasons:
21
21
22
-
```console
23
-
npm install -g ipfs@latest
24
-
```
22
+
- Having dependencies on the distributed web makes development **more available** because multiple nodes supplying tarballs means no panic if a single source goes dark
23
+
- It can also be **faster and cheaper** — if dependencies are already being hosted on your local network, this means lower bandwidth cost and higher speed
24
+
- If enough dependencies are hosted on your local network (think enterprise or community development settings), that network can operate **offline-first**: Take your team on a remote mountain retreat and hack away!
25
25
26
-
## Resources
26
+
## Install & use
27
+
### Check your js-ipfs version
27
28
28
-
-[The original demo video](https://vimeo.com/147968322)
29
-
-[Lengthy introduction in a blog post](http://daviddias.me/blog/stellar-module-management/)
This module depends on features in [v0.34.0](https://github.com/ipfs/js-ipfs/releases/tag/v0.34.0) release of [js-ipfs](https://github.com/ipfs/js-ipfs), so please ensure you are running at least that version:
31
30
32
-
## Lead Maintainer
33
-
34
-
[Alex Potsides](https://github.com/achingbrain)
31
+
```console
32
+
$ npm install -g ipfs@latest
33
+
```
35
34
36
-
## Install this module
35
+
###Install npm-on-ipfs
37
36
38
37
```console
39
-
>npm i ipfs-npm -g
38
+
$npm i ipfs-npm -g
40
39
```
41
40
42
-
#Usage
41
+
### Get started!
43
42
44
-
`ipfs-npm` wraps your chosen package manager (e.g. npm or yarn) with configuration to use IPFSto retrieve your dependences instead of over HTTP from the central npm registry.
43
+
`ipfs-npm` wraps your favorite package manager (npm or yarn) with configuration that uses IPFS, rather than HTTP, to retrieve your dependencies from the central npm registry. Since it's intended to replace npm/yarn, all the commands you're used to will work in the same way.
45
44
46
-
In the directory with your `package.json` file, run:
45
+
For example: In the directory with your `package.json` file, run ...
47
46
48
47
```console
49
48
$ ipfs-npm install
@@ -65,12 +64,11 @@ You can use any command you'd use with npm/yarn with ipfs-npm in exactly the sam
65
64
$ ipfs-npm install
66
65
$ ipfs-npm version minor
67
66
$ ipfs-npm publish
68
-
69
67
$ ipfs-npm --package-manager=yarn
70
68
// etc
71
69
```
72
70
73
-
## CLI
71
+
## CLI guide
74
72
75
73
```console
76
74
$ ipfs-npm --help
@@ -120,9 +118,9 @@ Options:
120
118
[default: "https://registry.npmjs.com"]
121
119
```
122
120
123
-
## Configuration File
121
+
## Configuration files
124
122
125
-
We use[`rc`](https://github.com/dominictarr/rc) to parse configuration files. Please see the [`rc` repository](https://github.com/dominictarr/rc#standards) for the order of precedence used when searching for configuration files. Our app is `ipfs-npm`.
123
+
ipfs-npm uses[`rc`](https://github.com/dominictarr/rc) to parse configuration files. Please see the [`rc` repository](https://github.com/dominictarr/rc#standards) for the order of precedence used when searching for configuration files. The app is `ipfs-npm`.
126
124
127
125
For instance, if you want to always use a remote daemon, you could create a `~/.ipfs-npmrc` file like this:
128
126
@@ -131,3 +129,18 @@ For instance, if you want to always use a remote daemon, you could create a `~/.
131
129
"ipfsNode": "/ip4/127.0.0.1/tcp/5001"
132
130
}
133
131
```
132
+
133
+
## To learn more
134
+
135
+
[Protocol Labs](https://protocol.ai), the organization behind IPFS, is actively working on improving the landscape for package managers and the distributed web in 2019 and beyond. To that end, we've created an [IPFS Package Managers Special Interest Group](https://github.com/ipfs/package-managers), and your feedback and contributions are very welcome!
136
+
137
+
If you're actively (or just casually) using npm-on-ipfs and have feedback about your user experience, we'd love to hear from you, too. Please open an issue in the [Special Interest Group](https://github.com/ipfs/package-managers) and we'll get right back to you.
138
+
139
+
More resources you may find useful:
140
+
-[The original npm-on-ipfs demo video](https://vimeo.com/147968322)
141
+
-[A more detailed introduction to npm-on-ipfs from David Dias' blog](http://daviddias.me/blog/stellar-module-management/)
142
+
-[Node.js Interactive talk on Stellar Module Management, aka npm-on-ipfs](https://www.youtube.com/watch?v=-S-Tc7Gl8FM)
0 commit comments