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

Use electron-builder and webpack@3 #277

Merged
merged 23 commits into from
Nov 24, 2017

Conversation

n-riesco
Copy link
Contributor

@chriddyp Could you review this PR?


I haven't gone as far as I originally planned with this work, but I'm going to open a PR in the main repo, so that people can test the installers generated with electron-builder.

A brief overview of what this PR does:

  • now falcon uses a patched version of ibm_db from my repo with @tarzzz 's fix (this is necessary for electron-builder to work)
  • I've upgraded dependencies if no code change was required (e.g. now we are using webpack@3 and mysql2)
  • I've removed unused dependencies, files and folders.
  • when possible I've moved modules from dependencies to devDependencies

Now the procedure to generate installers is:

$ yarn install
$ yarn build
$ yarn run pack

(Beware that yarn pack and yarn run pack do different things)

The procedure to build the app locally and test is still the same:

$ yarn install
$ yarn run rebuild:modules:electron
$ yarn build
$ yarn start

* Move Windows and Mac icons from app to app/icons.

* Generate icons for Linux.
* Fixed the build configuration so that electron-builder can generate
  installers for Windows (nsis), Mac (dmg) and Linux (tar.gz, deb and
  AppImage).

* Moved electron and electron-sudo to devDependencies.

* Removed electron-rebuild.

* Upgraded electron-builder to v19.46.4.
* Added fix for module ibm_db in mac to `scrips/install-modules.js`. See
  issue: ibmdb/node-ibm_db#329
* Renamed `scripts/install-modules.js` to `scripts/rebuild-modules.js`.
* Moved all the dependencies not listed as external in the webpack
  configs from dependencies to devDependencies.
- Restored immutable to silence warning that react-immutable-proptypes
  has unmet peer dependency.

- Restored babel-runtime to silence warning that react-dock has un unmet
  peer dependency.

- Fixed versions of csv-parse, fs-extra and mkdirp.
* So that electron-rebuild packs a rebuilt ibm_db module that includes
  the fix for issue: ibmdb/node-ibm_db#329
* Remove `yarn run rebuild:modules:electron` (as `yarn run pack` also
  runs it).

* Only zip the .exe installer.
* Pin only major versions of node and use default version of yarn.

* Replace `yarn run package` with `yarn run pack`.

* Remove `yarn run rebuild:modules:electron` (as `yarn run pack` also
  runs it).
* Kept `restify`, `ramba`, `electron-mocha` and `chai` pinned to the
  current major version, because an upgrade would require code changes.
* Removed unnecessary zip step.

* Pin node to major version only.
package.json Outdated
@@ -156,10 +157,11 @@
"fetch-cookie": "^0.6.0",
"fixed-data-table": "^0.6.4",
"form-data": "^2.3.1",
"fs-extra": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
"fs-extra": "^4.0.2",
"immutable": "^3.8.2",
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure that we've gotten rid of immutable everywhere, and that these prop type descriptions https://github.com/plotly/falcon-sql-client/blob/92755984257409dcdcfb29231e272d8e4d2d174d/app/components/Settings/Logger/Logger.react.js#L33 are actually incorrect. We can change this in a future PR though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept it to silence the warning that immutable is a peer depedency of react-immutable-proptypes.

Copy link
Member

Choose a reason for hiding this comment

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

right - i mean, we can probably remove all of the react-immutable-proptypes throughout our code as well

@chriddyp
Copy link
Member

this looks great! 💃

@n-riesco n-riesco merged commit dbeb96c into plotly:master Nov 24, 2017
@scjody scjody mentioned this pull request Dec 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants