The standard approach on Darwin is to keen applications running when the
window is closed. Clicking the apps icon again in the doc should bring
back the application window.
This changeset refactors things to handle this. It will keep Zap and lnd
running in the background when the main application window is closed.
Quitting the app will stop both the app and lnd.
Fix#586Fix#601
Use `lnd-binary` to download and install the correct mac/windows/linux
lnd binary as part of the install process.
See https://github.com/mrfelton/lnd-binary
Fetch the current block height from multiple block explorers early on in
the sync process. This ensures that we get the correct block height in
the case where our BTCd node is still mid way through syncing. Do this
in the main process rather than in the render process.
Concurrently v3.6.0 includes a number of improvements and fixes. Of
particular interest is the new npm command shortcut feature which we can
use to shorten our package scripts a little more.
See https://github.com/kimmobrunfeldt/concurrently/releases/tag/3.6.0
Remove the following project dependencies, which are not being used:
- express
- rimraf
- sinon
- bitcore-lib
- d3-force
- d3-selection
- d3-zoom
- split2
- xtend
Use `CspHtmlWebpackPlugin` to generate our content security policy
using code rather than hard coding meta tags on our html index page.
This provides us a more flexible means to configure our CSP dynamically.
Use `HtmlWebpackPlugin` to generate our final html file so that we can
remove our inline scripts and insert them dynamically based on our
webpack config.
Automatically validate commit messages according to the Conventional
Commit standard in a git commit-msg hook.
This functionality is optional and can be enabled by adding a .opt-in
file with a line `commit-msg`.
See:
- http://conventionalcommits.org/
- https://github.com/marionebl/commitlint
Currently we use eslint and prettier to lint and format code. However,
running the linter is a manual step that is easy to forget.
To improve this we run our lint scripts in a git pre-commit hook. This
functionality is optional and can be enabled by adding a .opt-in file
with a line `pre-commit`.
Currently we use eslint to lint code, but formatting the code according
to our ruleset is a manual process.
Implement `prettier` so that code is automatically formatted as part of
our development workflow.
See https://prettier.io/
Use debug-logger to provide a more comprehensive and flexible logging
solution. Use two separate log handlers to provide separation between
electron and and lnd logs.
Update all webpack packages to the latest v4.x compatible versions and
update supporting configs. This delivers noticeable performance
improvements to the DX.
The v5.2.0 includes (amongst other things) a fix for incorrectly reported
exit codes of child processes, which can prevent build build failures from
correctly halting a build, resulting in incomplete or invalid builds.
See https://github.com/kentcdodds/cross-env/issues/150#issuecomment-387737183
Update webpack and related packages to the latest 3.x versions. This
prevents errors from node-gyp when attempting to build fsevents (OSX),
which is an indirect dependency of webpack-dev-server (via chokidir)
See https://github.com/strongloop/fsevents/releases/tag/v1.1.0
The v20.15.1 release of electron-builder has been unpublished since its
original release and subsequently a newer v20.15.3 version has been
released. v20.15.3 resolves several critical issues found in v20.15.1,
one of which was causing `electron-builder install-app-deps` to hang
indefinitely when run without `DEBUG=electron-builder` being set
The latest version of electron-builder lets us use file macros in the file
patterns such as `$platform`, which is useful for us to be able to
include platform specific files in the build as DRY as possible.