-
-
Notifications
You must be signed in to change notification settings - Fork 445
Avoid duplicated serial plotter builds #1174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
'build', | ||
'..', | ||
'node_modules', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test this, but are you sure this works for the bundled version of the app as well? they have different file locations, I think we cannot include from the node_modules this way...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't work. It just works locally. I'm reverting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let Node.js find the plotter app: require.resolve
.
See the working example here: fspissu/avoid-twice-serial-plotter-app...kittaakos:avoid-twice-serial-plotter-app-2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was already investigating to do it in this way. Thanks for the hint @kittaakos 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice implementation, using the resolve to leverage how node looks for packages is quite clever!
Signed-off-by: Akos Kitta <[email protected]> Co-authored-by: Akos Kitta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Motivation
IDE2 contains two serial plotter apps, one in the
build
directory and the other innode_modules/arduino-ide-extension/build
.Change description
Do not copy the app into the
build
folder.Reviewer checklist