Ruby language extension
Ruby code intelligence.
Prerequisites
Sourcegraph extensions are written in TypeScript and are distributed as bundled JavaScript files that run on the client. For creation, publishing, and viewing, you need:
- Creation: Install Node.js.
- Publishing: Install the Sourcegraph CLI (
src
) and create a Sourcegraph.com account. - Viewing: Install the Sourcegraph extension for Chrome or Firefox.
Set up
npm install
Lint and type check
npm run tslint
npm run typecheck
Publish
src extensions publish
Sourecgraph extension API
Visit the Sourcegraph extension documentation and check out some Sourcegraph extension samples.
Building and running
# Build the .wasm and .js files
$ bazel build //emscripten:sorbet-wasm.tar --config=webasm-darwin && \
tar -xvf ./bazel-bin/emscripten/sorbet-wasm.tar sorbet-wasm.wasm sorbet-wasm.js
# Serve the .wasm and .js files
$ http-server --cors -p 5000 .
# Serve the extension
$ yarn run serve
Sideload the extension.
You should see hover tooltips: