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
This commit is contained in:
committed by
Soren L. Hansen
parent
5b8ba12cb3
commit
41f09daf42
@@ -1,3 +1,5 @@
|
||||
//go:build !dev
|
||||
|
||||
package bindata
|
||||
|
||||
import "embed"
|
||||
|
||||
28
bindata/bindata_dev.go
Normal file
28
bindata/bindata_dev.go
Normal file
@@ -0,0 +1,28 @@
|
||||
//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")}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user