Announcement

Collapse
No announcement yet.

include Bridge.NET generated code in VS Code Plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    include Bridge.NET generated code in VS Code Plugin

    Hi,
    many thanks for creating such a powerful tool.
    I created a SQL Formatter (SQLinForm) plugin in Java and C# (e.g. plugin for Notepad++) and now want to create a plugin for the VS Code editor and later also for the Atom editor.
    The 1st step I did was to translate the C# written code from C# into JS using Bridge.Net and it worked very well.
    The 2nd step I want to do now is to include the generated JS code into the VS Code plugin template. I have already read a lot of docs but did not find the information I was looking for. I am sorry but I am new to JS and new to VS Code plugin development. The thing is struggle most is how to call my JS module from within the extension.js module. Any idea where I could find more info how to include th Bridge.NET generated code into a VS Code plugin? Or is there an example in the docs and I just missed it? I am not asking you to to the coding, but maybe you know a good place to start reading. Thx!

    #2
    Hi guidomarcel

    Working with Bridge modules outside Bridge ecosystem could be challenging.The following sample project could be helpful. It demonstrates usage of Bridge output in a TypeScript project for a NodeJS app.
    https://github.com/bridgedotnet/Demo...ter/TSProjDemo

    Although the project doesn't really use JS modules, it just loads Bridge output as a script. More details on scripts vs. modules can be found here.

    If you really need to have a Bridge module loaded, it could be tricky since Bridge does not generate proper d.ts files for that purpose. Anyways, it's doable with some edits. I created the js-module branch with a JS project (project/folder names were not changed to avoid many edits).
    https://github.com/bridgedotnet/Demo...ule/TSProjDemo

    See the following changeset to learn what edits were required:
    https://github.com/bridgedotnet/Demo...366c5f07c9beea

    Hope that helps.

    Comment

    Working...
    X