resource-estimator
Sourcegraph resource estimator
Development Prerequisites
- Install Go, then:
- Install
wasmserve
:
go get -u github.com/hajimehoshi/wasmserve
Development
cd resource-estimator/
export GOROOT=$(go env GOROOT)
wasmserve -allow-origin='*'
This will start serving on http://localhost:8080 the WASM bundle and recompiling code each time you reload the page (any errors compiling your changes will show up in this terminal).
Developing on the docsite
Visit http://docs.sourcegraph.com/admin/install/resource_estimator?dev=true and the page will use your local wasmserve
instance, so
that changes you make to the code are automatically reflected when you reload the page.
This is the best option as you can see the page with full CSS styling.
Developing without the docsite
You can view the page without any CSS styling at http://localhost:8080
Releasing
- Get your changes merged into
master
first andgit checkout master
. - Run
./build.sh
which will produce amain_$COMMIT.wasm
file. - Upload that file to the Google Cloud Storage bucket.
- Update the
version=<oldcommit>
attribute in this file to match the file you uploaded. - Merge that PR and your change has been released!