Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Latest commit

 

History

History
100 lines (77 loc) · 2.83 KB

TODO.md

File metadata and controls

100 lines (77 loc) · 2.83 KB

TODO

"buildVersion": "1.2.3",
"artifactName": "${productName}-${buildVersion}-${arch}.${ext}",
    * we can use a .js file that computes the config according to the target app
  • configuration script

    • ask for target application path
    • install electron-rebuild in target application
    • update package json "from" / "to"
    • create config file w/ target app path, default client for electron
    • consume this file in src/main.js to launch the target app
  • find a clean way to orchestrate server from electron

    • clean target app server/index:
// for electron
process.send('ready');

e.g.

// parent.js
child_process.fork('./child', { env : { FORK : 1 } });

// child.js
if (process.env.FORK) {
  console.log('started from fork()');
}
+ idealy: need a way to send informations back and forth between electron and server
  • create a npm run rebuild that runs ./node_modules/.bin/electron-rebuild in target application
    • call it in npm npm run release
    • process could be something like:
[target] npm install electron rebuild
[target] `./node_modules/.bin/electron-rebuild -v [electron version]` 
[electron] npm run release
[target] rm -Rf node_modules
[target] npm install

Done

  npm install --save-dev electron-rebuild
  # rebuild against the version of electron we use
  ./node_modules/.bin/electron-rebuild -v 13.0.1 
  • portfinder

    • pass PORT to forked process
    • ok to do process.env.PORT = 8080; in src/main.js
  • explore if we can put the electron-wrapper inside the application itself