Use elm reactor for dev assets (#1133)

* Serve assets from elm reactor

* Update bindata.go
This commit is contained in:
Andrey Kuzmin 2017-12-10 21:59:15 +01:00 committed by GitHub
parent 7d795d8c03
commit f9e96fce3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 118 additions and 118 deletions

View File

@ -68,14 +68,14 @@ go-bindata:
template/internal/deftmpl/bindata.go: template/default.tmpl
@go-bindata $(bindata_flags) -mode 420 -modtime 1 -pkg deftmpl -o template/internal/deftmpl/bindata.go template/default.tmpl
ui/bindata.go: ui/app/script.js ui/app/index.html ui/lib
ui/bindata.go: ui/app/script.js ui/app/index.html ui/app/lib
# Using "-mode 420" and "-modtime 1" to make assets make target deterministic.
# It sets all file permissions and time stamps to 420 and 1
@go-bindata $(bindata_flags) -mode 420 -modtime 1 -pkg ui -o \
ui/bindata.go ui/app/script.js \
ui/app/index.html \
ui/app/favicon.ico \
ui/lib/...
ui/app/lib/...
ui/app/script.js: $(shell find ui/app/src -iname *.elm)
cd $(FRONTEND_DIR) && $(MAKE) script.js

View File

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

View File

@ -77,7 +77,7 @@ init flags location =
if prod then
location.pathname
else
"http://localhost:9093/"
"/"
in
update (urlUpdate location)
(Model

File diff suppressed because one or more lines are too long

View File

@ -67,7 +67,7 @@ func Register(r *route.Router, reloadCh chan<- struct{}, logger log.Logger) {
r.Get("/lib/*filepath", ihf("lib_files",
func(w http.ResponseWriter, req *http.Request) {
fp := route.Param(req.Context(), "filepath")
serveAsset(w, req, filepath.Join("ui/lib", fp), logger)
serveAsset(w, req, filepath.Join("ui/app/lib", fp), logger)
},
))