PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.96k stars 5.27k forks source link

[DOCS] Configuring VSCode shortcuts to publish actions and sources #4478

Open alysonturing opened 2 years ago

alysonturing commented 2 years ago

Context: Possibility to include docs with information of how to configure VSCode shortcuts (and possibly other editors) to easier the publishing of sources and actions built with javascript and typescript.

Additionally, somebody with windows environment could work on a version of the snippet for windows.

The following steps shows how it can be configured:

Snippet for MAC

[
  {
    "key": "cmd+r",
    "command": "terminalCommandKeys.run",
    "args": {
      "cmd": "/usr/bin/env cd ${fileWorkspaceFolder} && pd publish ${relativeFile}",
      "match": ".*"
    },
    "when": "resourcePath =~ /actions/ && resourceLangId == javascript"
  },
  {
    "key": "cmd+r",
    "command": "terminalCommandKeys.run",
    "args": {
      "cmd": "/usr/bin/env cd ${fileWorkspaceFolder} && pd dev ${relativeFile}",
      "match": ".*"
    },
    "when": "resourcePath =~ /sources/ && resourceLangId == javascript"
  },
  {
    "key": "cmd+r",
    "command": "terminalCommandKeys.run",
    "args": {
      "cmd": "/usr/bin/env cd ${fileWorkspaceFolder} && npm run build && currentFile=${relativeFile} && compiledFile=${${currentFile//\\/actions\\//\/dist\\/actions\\/}//.ts/.mjs} && while [ ! -f $compiledFile ]; do sleep 1; done && pd publish $compiledFile",
      "match": ".*"
    },
    "when": "resourcePath =~ /actions/ && resourceLangId == typescript"
  },
  {
    "key": "cmd+r",
    "command": "terminalCommandKeys.run",
    "args": {
      "cmd": "/usr/bin/env cd ${fileWorkspaceFolder} && npm run build && currentFile=${relativeFile} && compiledFile=${${currentFile//\\/sources\\//\/dist\\/sources\\/}//.ts/.mjs} && while [ ! -f $compiledFile ]; do sleep 1; done && pd dev $compiledFile",
      "match": ".*"
    },
    "when": "resourcePath =~ /sources/ && resourceLangId == typescript"
  },
]
dylburger commented 2 years ago

Thanks for the request! Did you know that anyone can author and publish their own Pipedream actions and sources? Would you be interested in helping out with that? We're happy to answer any questions or support you in any way.

If you don't have the time, would you be willing to reach out to the app provider to see if they're interested in building these? When we work with an app partner, it improves the quality of the integration, and it helps when this kind of request comes from a customer like you.