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

fix: upgrade electron examples #2104

Merged
merged 2 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RAD!

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 <daviddias@ipfs.io>",
"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.