-
Notifications
You must be signed in to change notification settings - Fork 60
Command to open compiled file #294
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
Command to open compiled file #294
Conversation
@fhammerschmidt would it be possible to refactor this to use the same |
Yes! Just did that and also factored out all the commands into separate files. Let me know if you think there is a better icon for this action: https://code.visualstudio.com/api/references/icons-in-labels#icon-listing |
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.
Looking great.
Is it ready to merge?
IMO yes, I used it all day while working on a big monorepo and it always worked well so far. |
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.
See comments.
I tried to be more explicit with the modulename -> foldername resolving. |
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.
Fantastic. Merging.
This implements #107
Press CMD+Shift+P and select
ReScript: Open the compiled JS file for this implementation file.
It should open the corresponding
.bs.js
,.js
,.mjs
in the correct directory (whether in-source or not).Unfortunately, this requires to parse
bsconfig.json
. I did not know how to account for an array with more than one element of package-specs, so for now it just takes the first one, but I guess it is better to use an object anyway, as suggested by the docs.