- Download the files with
gh repo clone posit-dev/positron
in some directory npm i
from the main directory to install packagesnpm run watch
from the main directory to compile client and extensions (watch-client
andwatch-extensions
). This will run continuously in the background, so you need a second terminal window
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
There is a task in VSCode/Positron debug menu called Positron
that will open a dev window.
This can be refreshed whenever updates occur.
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.
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 withCtrl + C
in the terminal. -
bash scripts/code.sh
from main directory. After this opens, you can close withCtrl + C
in the terminal. -
npm run gulp vscode-darwin-arm64-min
will build to an.app
file. This takes ~35 mins. Thevscode-darwin-arm64-min
works for arm64 (apple silicon). You can view other options withnpm run gulp --tasks
-
This will create
Positron.app
in../VSCode-darwin-arm64
(next topositron/
). You can move this toApplicatons
. Congrats, you did it!
I have picked this up from trying stuff out along with some help from other open-source folks: