Skip to content

Instantly share code, notes, and snippets.

@kylebutts
Last active June 7, 2025 15:07
Show Gist options
  • Save kylebutts/d4d3e49d7073c10beed180c8dd96a597 to your computer and use it in GitHub Desktop.
Save kylebutts/d4d3e49d7073c10beed180c8dd96a597 to your computer and use it in GitHub Desktop.
Dev Build of Positron

Dev

  1. Download the files with gh repo clone posit-dev/positron in some directory
  2. npm i from the main directory to install packages
  3. npm run watch from the main directory to compile client and extensions (watch-client and watch-extensions). This will run continuously in the background, so you need a second terminal window

Running tests

The npm test-extension takes way too long as it runs all tests. The -g and -l options do not seem to work. Instead, I recommend opening the positron folder with vscode and it will prompt you to install a task running extension. Install this and open the "Testing" view to run tests

Open dev positron window

There is a task in VSCode/Positron debug menu called Positron that will open a dev window. This can be refreshed whenever updates occur. CleanShot 2025-03-04 at 17 42 20@2x

This works great most of the time, but if not, you can do this. To open a dev positron window, run bash scripts/code.sh from the main directory. This will launch a window that you can experiment with. I had to restart this whenever updating an extension (maybe there's an option to reload but I don't know). Note this requires npm run watch to be run before opening.

Build

Now say you make some changes and want to compile this to Positron.app. You can do this via the following steps:

  • npm install from main directory

  • npm run watch from main directory. Once this finishes, you can close with Ctrl + C in the terminal.

  • bash scripts/code.sh from main directory. After this opens, you can close with Ctrl + C in the terminal.

  • npm run gulp vscode-darwin-arm64-min will build to an .app file. This takes ~35 mins. The vscode-darwin-arm64-min works for arm64 (apple silicon). You can view other options with npm run gulp --tasks

  • This will create Positron.app in ../VSCode-darwin-arm64 (next to positron/). You can move this to Applicatons. Congrats, you did it!

Sources

I have picked this up from trying stuff out along with some help from other open-source folks:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment