Merge pull request #1331 from ramiresviana/tweaks-2

Some development tweaks
This commit is contained in:
Oleg Lobanov 2021-03-15 16:56:20 +01:00 committed by GitHub
commit 99787287bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ _old
rice-box.go
.idea/
filebrowser
filebrowser.exe
.DS_Store
node_modules

View File

@ -49,7 +49,7 @@ build-frontend: | ; $(info $(M) building frontend…)
## build-backend: Build backend
.PHONY: build-backend
build-backend: | ; $(info $(M) building backend)
$Q $(GO) build -ldflags '$(LDFLAGS)' -o filebrowser
$Q $(GO) build -ldflags '$(LDFLAGS)' -o .
## test: Run all tests
.PHONY: test
@ -61,7 +61,7 @@ test-frontend: | ; $(info $(M) running frontend tests…)
## test-backend: Run backend tests
.PHONY: test-backend
test-backend: | $(RICE) ; $(info $(M) running backend tests)
test-backend: | ; $(info $(M) running backend tests)
$Q $(GO) test -v ./...
## lint: Lint

View File

@ -1,3 +1,5 @@
// +build !dev
package frontend
import "embed"

14
frontend/assets_dev.go Normal file
View File

@ -0,0 +1,14 @@
// +build dev
package frontend
import (
"io/fs"
"os"
)
var assets fs.FS = os.DirFS("frontend")
func Assets() fs.FS {
return assets
}