Skip to content

Commit 2b7bcea

Browse files
Akos Kittaspoenemann
Akos Kitta
authored andcommitted
Updated the packager, included the debug extension
Note, I did not check in `/electron/packager/yarn.lock`. It should be checked in, see the `master`. Signed-off-by: Akos Kitta <[email protected]>
1 parent 5baf43b commit 2b7bcea

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

electron/build/template-package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"main": "src-gen/frontend/electron-main.js",
55
"author": "Arduino SA",
66
"dependencies": {
7-
"arduino-ide-extension": "file:../working-copy/arduino-ide-extension"
7+
"arduino-ide-extension": "file:../working-copy/arduino-ide-extension",
8+
"arduino-debugger-extension": "file:../working-copy/arduino-debugger-extension"
89
},
910
"resolutions": {
1011
"**/fs-extra": "^4.0.3"

electron/packager/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
// Copy the following items into the `working-copy` folder. Make sure to reuse the `yarn.lock`. |
4343
//----------------------------------------------------------------------------------------------+
4444
mkdir('-p', path('..', workingCopy));
45-
for (const name of ['arduino-ide-extension', 'electron-app', 'yarn.lock', 'package.json', 'lerna.json']) {
45+
for (const name of ['arduino-ide-extension', 'arduino-debugger-extension', 'electron-app', 'yarn.lock', 'package.json', 'lerna.json']) {
4646
cp('-rf', path(rootPath, name), path('..', workingCopy));
4747
}
4848

49-
//-----------------------------------------------------+
49+
//---------------------------------------------+
5050
// No need to build the `browser-app` example. |
51-
//-----------------------------------------------------+
51+
//---------------------------------------------+
5252
//@ts-ignore
5353
let pkg = require('../working-copy/package.json');
5454
const workspaces = pkg.workspaces;
@@ -72,6 +72,14 @@
7272
// We have to do it before changing the dependencies to `local-path`.
7373
const unusedDependencies = await utils.collectUnusedDependencies('../working-copy/electron-app/');
7474

75+
//-------------------------------------------------------------------------------------------------------------+
76+
// Change the regular NPM dependencies to `local-paths`, so that we can build them without any NPM registries. |
77+
//-------------------------------------------------------------------------------------------------------------+
78+
// @ts-ignore
79+
pkg = require('../working-copy/arduino-debugger-extension/package.json');
80+
pkg.dependencies['arduino-ide-extension'] = 'file:../arduino-ide-extension';
81+
fs.writeFileSync(path('..', workingCopy, 'arduino-debugger-extension', 'package.json'), JSON.stringify(pkg, null, 2));
82+
7583
//------------------------------------------------------------------------------------+
7684
// Merge the `working-copy/package.json` with `electron/build/template-package.json`. |
7785
//------------------------------------------------------------------------------------+

0 commit comments

Comments
 (0)