Frontend contribution guidelines
To work on most frontend issues, it is necessary to run three applications locally:
- The web app in the client/web directory.
- Storybook (client/storybook)
- The browser extension (client/browser)
Project Setup
- Clone the repo:
git clone https://github.com/sourcegraph/sourcegraph/
. - Make sure your node environment is running version
16.x.x
. - Go through the local development section here.
CI checks to run locally
-
Typescript checks.
# Generate Typescript types pnpm generate # Verify Typescript build pnpm build-ts
-
Linters.
pnpm lint:js:all pnpm lint:css:all pnpm lint:graphql pnpm format:check
-
Unit tests
# Run unit tests pnpm test
-
Integration tests
# Prepare web application for integration tests ENTERPRISE=1 DISABLE_TYPECHECKING=true pnpm run build-web # Run integration tests pnpm test-integration
Relevant development docs
Getting applications up and running
- Developing the Sourcegraph web app
- Table of contents related to the web app
- Configuring backend services locally is not required for most frontend issues. However, a guide on how to do this can be found here.