*>    I only know how to install such packaged extensions from the
marketplace.*

It's way simpler than you think: When developing and/or building an
extension (to try out new features that you've added to the LeoJS codebase
itself), you dont build a VSIX, nor go through the packaging process of all
the metadata and so on - Here's what to do...

Having Node.js <https://nodejs.org/> and Git <https://git-scm.com/>
 installed:

You clone the repo and you open it with vscode *as a workspace.* (cd into
the repo and launch vscode with '*vscode .' *the dot means open THIS folder
with vscode, not some individual file(s) )

 1- run the '*npm install'  *command in a terminal, (or in vscode's
integrated terminal) this will install all the project
folder's dependencies.

 2- you just press F5 in vscode to compile and run (this will start a new
vscode window with the NEW version of the extension running, replacing the
existing LeoJS *without de-installing it)* That new vscode window can be
live-debugged, stepped through, and inspected from the original vscode
window.

Tada!!

( I would recommend going through this very short tutorial
https://code.visualstudio.com/api/get-started/your-first-extension in case
the above didnt work )

Thanks again for trying out all that stuff ! I know how strange using a new
language/framework can feel when coming from an unrelated
language&environment paradigm !

Félix


On Fri, May 3, 2024 at 10:49 PM Thomas Passin <tbp100...@gmail.com> wrote:

>
> On Friday, May 3, 2024 at 9:45:46 PM UTC-4 Félix wrote:
>
> Thanks for this great question Thomas!
>
> Lastly, *for modifying LeoJS itself *(instead of running scripts from
> custom @commands or @buttons, or building an extension and accessing the
> LeoJS global 'g' object) you would just need to clone the LeoJS repository.
> To then build and run it would be the same process as any of the VSCode
> sample extensions, such as this hello-world extension
> <https://github.com/microsoft/vscode-extension-samples/tree/main/helloworld-sample>.
> (That is to say, running the 'npm install' in the repository folder command
> to get all dependencies, and pressing F5 to start the 'run and debug'
> command in VSCode.)
>
>
> This is where I lose track of what to do.  So far as I know up until now,
> an extension needs to packaged in a particular way with certain metadata.
> I only know how to install such packaged extensions from the marketplace.
> I suppose I need to know how to run an extension when one has not gone
> through all that packaging process and is not using the marketplace.  Of
> course, with Leo-Python you don't have to do anything special: the code is
> just there and you run it.
>
> (BTW I have already cloned the repo).
>
> Another aspect of running one's modified LeoJS code is how to *not* run
> the existing LeoJS (the marketplace extension) without de-installing it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/ac9e65e0-0047-42b0-ad7b-17d8a13470fan%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/ac9e65e0-0047-42b0-ad7b-17d8a13470fan%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%3DZVRKO3v-h7uBsWim1fjKhvnb7ra10chPG_b%3DxANThygFq7Q%40mail.gmail.com.

Reply via email to