Noodles Practicing Medicine
    Have ideas to improve npm?Join in the discussion! »

    @remixproject/plugin-vscode
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.14 • Public • Published

    Plugin vscode

    This library provides connectors to run plugin in a vscode environment. Use this connector if you have a web based plugin that needs to run inside vscode.

    Except if you want your plugin to ONLY work on vscode, prefer @remixproject/plugin-webview

    npm install @remixproject/plugin-vscode
    

    Webview

    Similar to @remixproject/plugin-iframe, the webview connector will connect to an engine running inside vscode.

    If you do not expose any API you can create an instance like this :

    <script>
      const client = createClient(ws)
      client.onload(async () => {
        const data = client.call('filemanager', 'readFile', 'ballot.sol')
      })
    </script>

    If you need to expose an API to other plugin you need to extends the class:

    <script>
      class MyPlugin extends PluginClient {
        methods = ['hello']
        hello() {
          console.log('Hello World')
        }
      }
      const client = createClient(ws)
      client.onload(async () => {
        const data = client.call('filemanager', 'readFile', 'ballot.sol')
      })
    </script>

    Keywords

    none

    Install

    npm i @remixproject/plugin-vscode

    DownloadsWeekly Downloads

    247

    Version

    0.3.14

    License

    MIT

    Unpacked Size

    7.95 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar