Search extension
Replaces org:sourcegraph
with r:sourcegraph/
in Sourcegraph search queries. Example of a Soucegraph extension using the search API.
Prerequisites
Sourcegraph extensions are written in TypeScript are distributed as bundled JavaScript files that run on the client. For creation, publishing, and viewing, you need:
- Creation: Install Node.js and npm
- Publishing: Install the Sourcegraph CLI (
src
) and create a Sourcegraph.com account - Viewing: Install Sourcegraph extension for Chrome or Firefox.
Setup
npm install
Check check and lint
npm run tslint
npm run typecheck
Publish
src extensions publish