|
14 | 14 | const workingCopy = 'working-copy';
|
15 | 15 |
|
16 | 16 | /**
|
17 |
| - * Relative path from the `__dirname` to the root where the `arduino-ide-extension` and the `arduino-ide-electron` folders are. |
| 17 | + * Relative path from the `__dirname` to the root where the `arduino-ide-extension` and the `electron-app` folders are. |
18 | 18 | * This could come handy when moving the location of the `electron/packager`.
|
19 | 19 | */
|
20 | 20 | const rootPath = join('..', '..');
|
|
42 | 42 | // Copy the following items into the `working-copy` folder. Make sure to reuse the `yarn.lock`. |
|
43 | 43 | //----------------------------------------------------------------------------------------------+
|
44 | 44 | mkdir('-p', path('..', workingCopy));
|
45 |
| - for (const name of ['arduino-ide-extension', 'arduino-ide-electron', 'yarn.lock', 'package.json', 'lerna.json']) { |
| 45 | + for (const name of ['arduino-ide-extension', 'electron-app', 'yarn.lock', 'package.json', 'lerna.json']) { |
46 | 46 | cp('-rf', path(rootPath, name), path('..', workingCopy));
|
47 | 47 | }
|
48 | 48 |
|
|
52 | 52 | //@ts-ignore
|
53 | 53 | let pkg = require('../working-copy/package.json');
|
54 | 54 | const workspaces = pkg.workspaces;
|
55 |
| - // We cannot remove the `arduino-ide-electron`. Otherwise, there is not way to collect the unused dependencies. |
| 55 | + // We cannot remove the `electron-app`. Otherwise, there is not way to collect the unused dependencies. |
56 | 56 | const dependenciesToRemove = ['browser-app'];
|
57 | 57 | for (const dependencyToRemove of dependenciesToRemove) {
|
58 | 58 | const index = workspaces.indexOf(dependencyToRemove);
|
|
70 | 70 | // Collect all unused dependencies by the backend. We have to remove them from the electron app.
|
71 | 71 | // The `bundle.js` already contains everything we need for the frontend.
|
72 | 72 | // We have to do it before changing the dependencies to `local-path`.
|
73 |
| - const unusedDependencies = await utils.collectUnusedDependencies('../working-copy/arduino-ide-electron/'); |
| 73 | + const unusedDependencies = await utils.collectUnusedDependencies('../working-copy/electron-app/'); |
74 | 74 |
|
75 | 75 | //------------------------------------------------------------------------------------+
|
76 | 76 | // Merge the `working-copy/package.json` with `electron/build/template-package.json`. |
|
77 | 77 | //------------------------------------------------------------------------------------+
|
78 | 78 | // @ts-ignore
|
79 |
| - pkg = require('../working-copy/arduino-ide-electron/package.json'); |
| 79 | + pkg = require('../working-copy/electron-app/package.json'); |
80 | 80 | // @ts-ignore
|
81 | 81 | const template = require('../build/template-package.json');
|
82 | 82 | template.build.files = [ ...template.build.files, ...unusedDependencies.map(name => `!node_modules/${name}`) ];
|
|
0 commit comments