From 6d590cd11159dfa3dd56f75909179efa7f21fa83 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Mon, 2 Sep 2019 14:57:28 +0200 Subject: [PATCH] Fixed the packager for the new folder structure. Signed-off-by: Akos Kitta --- README.md | 2 +- electron/packager/index.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aff79893..3af44b6f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ git clone https://github.com/bcmi-labs/arduino-editor cd arduino-editor yarn yarn rebuild:electron -yarn --cwd arduino-ide-electron start +yarn --cwd electron-app start ``` If you want to switch back to the browser-based example, execute the following in the repository root diff --git a/electron/packager/index.js b/electron/packager/index.js index 049f1487..330a4720 100644 --- a/electron/packager/index.js +++ b/electron/packager/index.js @@ -14,7 +14,7 @@ const workingCopy = 'working-copy'; /** - * Relative path from the `__dirname` to the root where the `arduino-ide-extension` and the `arduino-ide-electron` folders are. + * Relative path from the `__dirname` to the root where the `arduino-ide-extension` and the `electron-app` folders are. * This could come handy when moving the location of the `electron/packager`. */ const rootPath = join('..', '..'); @@ -42,7 +42,7 @@ // Copy the following items into the `working-copy` folder. Make sure to reuse the `yarn.lock`. | //----------------------------------------------------------------------------------------------+ mkdir('-p', path('..', workingCopy)); - for (const name of ['arduino-ide-extension', 'arduino-ide-electron', 'yarn.lock', 'package.json', 'lerna.json']) { + for (const name of ['arduino-ide-extension', 'electron-app', 'yarn.lock', 'package.json', 'lerna.json']) { cp('-rf', path(rootPath, name), path('..', workingCopy)); } @@ -52,7 +52,7 @@ //@ts-ignore let pkg = require('../working-copy/package.json'); const workspaces = pkg.workspaces; - // We cannot remove the `arduino-ide-electron`. Otherwise, there is not way to collect the unused dependencies. + // We cannot remove the `electron-app`. Otherwise, there is not way to collect the unused dependencies. const dependenciesToRemove = ['browser-app']; for (const dependencyToRemove of dependenciesToRemove) { const index = workspaces.indexOf(dependencyToRemove); @@ -70,13 +70,13 @@ // Collect all unused dependencies by the backend. We have to remove them from the electron app. // The `bundle.js` already contains everything we need for the frontend. // We have to do it before changing the dependencies to `local-path`. - const unusedDependencies = await utils.collectUnusedDependencies('../working-copy/arduino-ide-electron/'); + const unusedDependencies = await utils.collectUnusedDependencies('../working-copy/electron-app/'); //------------------------------------------------------------------------------------+ // Merge the `working-copy/package.json` with `electron/build/template-package.json`. | //------------------------------------------------------------------------------------+ // @ts-ignore - pkg = require('../working-copy/arduino-ide-electron/package.json'); + pkg = require('../working-copy/electron-app/package.json'); // @ts-ignore const template = require('../build/template-package.json'); template.build.files = [ ...template.build.files, ...unusedDependencies.map(name => `!node_modules/${name}`) ];