gotty/bindata/bindata_dev.go
Søren L. Hansen 41f09daf42 Improve JS workflow
Now we can launch Chrome from vscode and also set breakpoints and have
them be respected.

Work still to be done:

The "Launch Chrome" task should compile the typescript stuff.

It takes too long to rebuild the typescript stuff. It is bothersome
during development. If we can work around that with webpack, that's
great. If generating the gotty bundle is what makes it all time
consuming, we should skip the bundle generation for development and
change the index.html to point to a not-bundled version.

Partially fixes #3
2022-11-28 15:03:43 -08:00

29 lines
317 B
Go

//go:build dev
package bindata
import (
"io"
"io/fs"
"os"
)
type GottyFS struct {
fs.FS
}
var Fs GottyFS
func (gfs *GottyFS) ReadFile(name string) ([]byte, error) {
fp, err := gfs.Open(name)
if err != nil {
return nil, err
}
return io.ReadAll(fp)
}
func init() {
Fs = GottyFS{os.DirFS("bindata")}
}