git clone https://github.com/TeamCodeStream/codestream.git
Versions
The CodeStream clients all live in a single git mono-repo. Each IDE has their own tools for generating builds and Jetbrains is no different!
- ensure you have your gradle/JVM set to a version 11 (temurin-11 for example)
- run gradle task
buildDependencies
once (it willrun npm install
, etc for dependencies) - run gradle task
buildDebugDependencies
- ensure the
jb [runIde]
configuration is selected and run in debug mode (click the 🐛 icon to start)
if you want a quick way to test changes in the agent/webview, then run the npm agent:watch and watch tasks and uncomment and edit those 2 lines in build.gradle
to debug the webview:
with JCEF you can right-click the webview and select open dev tools
with JxBrowser, you can attach a chrome inspector to port 9222
in both cases, runIde must be ran in debug mode
You can build some of the shared dependencies from a terminal. From where you have cloned the repository, execute the following command to build the agent and CodeStream for Jetbrains extension from scratch:
cd jb
npm run rebuild
👉 NOTE! This will run a complete rebuild of the extension, webview, and agent.
To just run a quick build of the extension, use:
cd jb
npm run build
To just run a quick build of the agent, use:
cd shared/agent
npm run build
npm install --no-save
... needs to be run for shared/ui, shared/agent, jb
npm run build
... needs to be run for shared/agent then jb
If you get a 'pushd not found' error on npm run rebuild, it's because Ubuntu uses sh for the default shell. Tell npm to use bash instead:
Create a file in the vscode folder called
.npmrc
with content
script-shell=/bin/bash
To run the agent unit tests run the following from a terminal:
cd shared/agent
npm run test-acceptance
or
cd shared/agent
npm run test-unit
To run the webview unit tests run the following from a terminal:
cd shared/ui
npm run test