How to develop this plugin?

Issue #319 resolved
Henrik Raitasola created an issue

Hey

I would like to make PR for this plugin but how can I get started? I would just need some basic steps how can I run the development version of this plugin. I did not find anything related to this in the README 🙂

Comments (9)

  1. Nick Rundquist

    The following instructions will work on Mac and Linux. Windows should be similar but I don’t know the exact command syntax off the top of my head.

    After cloning the repository you’ll need to run the following commands

    npm install

    npm run devcompile

    You’ll also need a launch configuration before you can run the extension from within VS Code. If you’re not familiar with setting these up there’s an example file included in the repository at .vscode/lauch.json.example. You can just copy this without the example suffix and VS Code will pick it up.

    cp .vscode/launch.json.example .vscode/launch.json.

    Once you’ve done the above you can run the extension from within VS Code by clicking on the Debug and Run icon in the activity bar, selecting “Extension” and clicking “Start Debugging” (the icon that looks like a play button).

    After making a change you’ll need to re-run npm run devcompile before debugging in VS Code.

  2. Henrik Raitasola reporter

    Okay I did all those steps. When I press the play button I will see this in the terminal:

    After that it does not start another vscode window 🤔

    Only when I press ctrl + c to cancel the terminal THEN the other vscode window opens. Why this could happen? I am working on macOS Mojave 10.14.6

  3. Henrik Raitasola reporter

    Okay I managed to create PR! https://bitbucket.org/atlassianlabs/atlascode/pull-requests/660/more-useful-commit-timestamp-formatting/diff

    So my current workflow is this:

    1. make some change
    2. run `yarn devcompile`
    3. Start debugging from green play button
    4. wait until compile done
    5. ctrl + c on the terminal so the new vscode window will open
    6. verify the changes
    7. repeat after every change

    So it kinda works but it is very painful specially when I have to do the ctrl + c thing 😕 Any tips for that?

  4. Nick Rundquist

    If you edit the prelaunchTask property in the Extension configuration in launch.json so that it reads "preLaunchTask": "npm: lookAway" instead of "preLaunchTask": "npm: watch" it should solve the issue of the development host not launching immediately. It calls tsc with slightly different arguments (configured in package.json). I’m not sure why including --watch works on some machines but not others.

  5. Henrik Raitasola reporter

    Thx @Nick Rundquist ! This helped! Maybe this is worth mention in the README? Or maybe separate HOW-TO-DEVELOP.md?

  6. Nick Rundquist

    Yeah, it’s definitely time to update the README. I’ve added a task for one of us to do that.

  7. Log in to comment