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

Commit

Permalink
fix: upgrade electron examples (#2104)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias authored and Alan Shaw committed May 24, 2019
1 parent ba80e40 commit 67e1b59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 35 deletions.
21 changes: 2 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,25 +946,8 @@ A way to mitigate this in Chrome, is to run your IPFS node inside a Service Work
Yes you can and in many ways. Read https://github.com/ipfs/notes/issues/256 for the multiple options.
If your [electron-rebuild step is failing](https://github.com/ipfs/js-ipfs/issues/843), all you need to do is:
```bash
# Electron's version.
export npm_config_target=2.0.0
# The architecture of Electron, can be ia32 or x64.
export npm_config_arch=x64
export npm_config_target_arch=x64
# Download headers for Electron.
export npm_config_disturl=https://atom.io/download/electron
# Tell node-pre-gyp that we are building for Electron.
export npm_config_runtime=electron
# Tell node-pre-gyp to build module from source code.
export npm_config_build_from_source=true
# Install all dependencies, and store cache to ~/.electron-gyp.
HOME=~/.electron-gyp npm install
```
If you find any other issue, please check the [`Electron Support` issue](https://github.com/ipfs/js-ipfs/issues/843).
We now support Electron v5.0.0 without the need to rebuilt native modules.
Still if you run into problems with native modules follow these instructions [here](https://electronjs.org/docs/tutorial/using-native-node-modules).
#### Have more questions?
Expand Down
5 changes: 2 additions & 3 deletions examples/run-in-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"description": "A minimal Electron application with js-ipfs",
"main": "main.js",
"scripts": {
"start": "electron .",
"postinstall": "./rebuild.sh"
"start": "electron ."
},
"keywords": [
"Electron",
Expand All @@ -15,7 +14,7 @@
"author": "David Dias <[email protected]>",
"license": "MIT",
"devDependencies": {
"electron": "^4.2.0",
"electron": "^5.0.2",
"electron-rebuild": "^1.8.4",
"ipfs": "ipfs/js-ipfs"
},
Expand Down
13 changes: 0 additions & 13 deletions examples/run-in-electron/rebuild.sh

This file was deleted.

0 comments on commit 67e1b59

Please sign in to comment.