Use the same entrypoint for etcher and the child writer

Changelog-entry: Use the same entrypoint for etcher and the child writer
Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2019-10-11 14:58:30 +02:00
parent 1be1a2b8f7
commit 1098f8cb1e
3 changed files with 5 additions and 8 deletions

View File

@ -22,12 +22,9 @@
// *won't* attempt to load the `app.asar` application by default, therefore
// if passing `ELECTRON_RUN_AS_NODE`, you have to pass the path to the asar
// or the entry point file (this file) manually as an argument.
//
// We also consider `ATOM_SHELL_INTERNAL_RUN_AS_NODE`, which is basically
// an older equivalent of `ELECTRON_RUN_AS_NODE` that still gets set when
// using `child_process.fork()`.
if (process.env.ELECTRON_RUN_AS_NODE || process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE) {
if (process.env.ELECTRON_RUN_AS_NODE) {
require('./gui/modules/child-writer')
} else {
require('../generated/etcher')
require('./gui/etcher')
}

View File

@ -9,7 +9,7 @@
"sleepDays": 7,
"semverRange": "<2.0.0"
},
"main": "lib/start.js",
"main": "generated/etcher.js",
"description": "Flash OS images to SD cards and USB drives, safely and easily.",
"productDescription": "Etcher is a powerful OS image flasher built with web technologies to ensure flashing an SDCard or USB drive is a pleasant and safe experience. It protects you from accidentally writing to your hard-drives, ensures every byte of data was written correctly and much more.",
"homepage": "https://github.com/balena-io/etcher",

View File

@ -145,7 +145,7 @@ const etcherConfig = _.assign({
}
],
entry: {
etcher: path.join(__dirname, 'lib', 'gui', 'etcher.js')
etcher: path.join(__dirname, 'lib', 'start.js')
},
output: {
path: path.join(__dirname, 'generated'),