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

Commit

Permalink
docs: update electron example
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jun 29, 2017
1 parent 30bd19c commit 5dcfdb4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
15 changes: 13 additions & 2 deletions examples/electron/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# js-ipfs in Electron

This example is heavily inspired by [electron-quick-start](https://github.com/electron/electron-quick-start).
> This example is heavily inspired by [electron-quick-start](https://github.com/electron/electron-quick-start).
Simply `npm install` and `npm start` to see it working.
**DISCLAIMER:** This example is still a work in progress, it currently doesn't work due to the usage of native dependencies that Electron is not supporting.

To try it by yourself, do:

```
> npm install
> ./node_modules/.bin/electron-rebuild
# or
> ./build.sh
#
# You can also try to use `npm start` to see where electron errors
```
13 changes: 13 additions & 0 deletions examples/electron/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Electron's version.
export npm_config_target=1.6.11
# 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

0 comments on commit 5dcfdb4

Please sign in to comment.