git ssb


2+

Dominic / electroapp



Branch:

Dominic Tarr committed oops, preload.js, not load.jsLatest: 07d2aaa on 3/14/2017, 7:40:13 PM
📄LICENSE
📄README.md
📁app
📄package.json

electroapp

Run a depject app within electron, the native addons needed for an interesting p2p app are bundled in (leveldown, chloride) so that they do not need to be installed with npm.

start electroapp with the layers needed as cli arguments. since depject-scripts is used, so each entry point needs to start with a call to expose

expose({
  gives: ..., needs: ..., create: ...
})

or it can be a nested collection of modules

expose({
  foo: {gives,needs,create},
  bar: {gives,needs,create},
  ...
})

There must be a module that gives an app method, this will be called to start the app. (the app method is responsible to adding itself to the dom, etc)

I used this command (with an already running sbot)

electroapp --sbot [ ../scuttlebot/expose.js ] --patch [ ../patchcore/expose.js ../picknmix/expose.js ./app.js]

(I added expose methods to patchcore, picknmix and scuttlebot, but they did not give app so app.js gives that)

I want to rewrite scuttlebot to use depject, but havn't started that yet.

usage

electroapp --{name} [ layers... {options} ]

One or more apps may be provided. Any option taken by BrowserWindow
may be passed to a layer. --dev to enable dev tools, --dev detach to show tools as separate window.

to do

Store the layers in some sort of file, and be able to add to those via the cli etc. Also, figure out a way to curate a changing layer or changing layers (as browserify bundles)

License

MIT


Built with git-ssb-web