Merge pull request #361 from vvp/master

Add Linux-specific installation details in README
This commit is contained in:
Haad 2018-04-17 10:39:39 +02:00 committed by GitHub
commit a516d6d38a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -127,11 +127,24 @@ npm install --global babel-cli
npm install --global webpack
```
Some dependencies depend on native addon modules, so you'll also need to meet [node-gyp's](https://github.com/nodejs/node-gyp#installation) installation prerequisites. Therefore, Linux users may need to
```
make clean && make
```
to redo the local package-lock.json with working native dependencies.
### Browser example
In macOS:
```
npm run build
npm run examples:browser
npm run examples:browser-macos
```
In Linux:
```
npm run build
npm run examples:browser-linux
```
<p align="left">

View File

@ -47,7 +47,8 @@
"scripts": {
"examples": "npm run examples:node",
"examples:node": "node examples/eventlog.js",
"examples:browser": "open examples/browser/browser.html",
"examples:browser-macos": "open examples/browser/browser.html",
"examples:browser-linux": "xdg-open examples/browser/browser.html",
"test": "TEST=all mocha",
"build": "npm run build:es5 && npm run build:debug && npm run build:dist && npm run build:examples",
"build:examples": "webpack --config conf/webpack.example.config.js --sort-modules-by size && mkdir -p examples/browser/lib && cp node_modules/ipfs/dist/index.js examples/browser/lib/ipfs.js",