From 746ee5002722df6dd98be488713f3f3191353c0c Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 14 Jan 2020 18:09:03 +0100 Subject: [PATCH] Convert start.js to typescript Change-type: patch --- lib/{start.js => start.ts} | 8 ++------ webpack.config.js | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) rename lib/{start.js => start.ts} (84%) diff --git a/lib/start.js b/lib/start.ts similarity index 84% rename from lib/start.js rename to lib/start.ts index 2c38c112..38f62f40 100644 --- a/lib/start.js +++ b/lib/start.ts @@ -14,8 +14,6 @@ * limitations under the License. */ -'use strict' - // See http://electron.atom.io/docs/v0.37.7/api/environment-variables/#electronrunasnode // // Notice that if running electron with `ELECTRON_RUN_AS_NODE`, the binary @@ -24,9 +22,7 @@ // or the entry point file (this file) manually as an argument. if (process.env.ELECTRON_RUN_AS_NODE) { - // eslint-disable-next-line node/no-missing-require - require('./gui/modules/child-writer') + import('./gui/modules/child-writer'); } else { - // eslint-disable-next-line node/no-missing-require - require('./gui/etcher') + import('./gui/etcher'); } diff --git a/webpack.config.js b/webpack.config.js index efceabae..748cca61 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -121,7 +121,7 @@ const etcherConfig = { externalPackageJson('../package.json') ], entry: { - etcher: path.join(__dirname, 'lib', 'start.js') + etcher: path.join(__dirname, 'lib', 'start.ts') } }