mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-14 01:14:25 +00:00
41f09daf42
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
29 lines
317 B
Go
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")}
|
|
}
|