Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React bo #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Created by .ignore support plugin (hsz.mobi)
explorer/node_modules
explorer/dist
dist/*
app/assets/bindata.go
data
admin/build
admin/node_modules
vendor
runtime
.glide
fork
backoffice
node_modules
.DS_Store
.vscode
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ define back
$(call docker,back,$(1))
endef

define front
$(call docker,front,$(1))
endef

define docker
if [ ! -f /.dockerenv ]; then \
docker-compose run $(1) /bin/bash -c "$(2)"; \
Expand All @@ -21,12 +25,16 @@ define docker
fi
endef

shell:
back:
docker-compose run back /bin/bash

front:
docker-compose run front /bin/bash

install:
$(call back,glide install)
$(call back,go get github.com/wadey/gocovmerge && go get golang.org/x/tools/cmd/cover && go get golang.org/x/tools/cmd/goimports && go get -u github.com/jteeuwen/go-bindata/...)
$(call front,yarn)

test:
$(call back,./app/assets/bindata.sh && go test -v $(GONODE_CORE) $(GONODE_MODULES) ./test/modules)
Expand All @@ -39,6 +47,7 @@ format:

run:
docker-compose kill
mkdir -p gui/dist
docker-compose up

load: ## Load fixtures
Expand Down
3 changes: 2 additions & 1 deletion app/assets/bindata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ GO_BINDATA_PATHS="${GOPATH}/src/github.com/rande/gonode/modules/..."
GO_BINDATA_IGNORE="(.*)\.(go|DS_Store)"
GO_BINDATA_OUTPUT="${GOPATH}/src/github.com/rande/gonode/app/assets/bindata.go"
GO_BINDATA_PACKAGE="assets"
GUI_PATH="${GOPATH}/src/github.com/rande/gonode/gui/dist"

echo "Generating bindata file..."
cd ${GOPATH}/src && go-bindata -dev -prefix ${GOPATH}/src -o ${GO_BINDATA_OUTPUT} -pkg ${GO_BINDATA_PACKAGE} -ignore ${GO_BINDATA_IGNORE} ${GO_BINDATA_PATHS}
cd ${GOPATH}/src && go-bindata -dev -prefix ${GOPATH}/src -o ${GO_BINDATA_OUTPUT} -pkg ${GO_BINDATA_PACKAGE} -ignore ${GO_BINDATA_IGNORE} ${GUI_PATH} ${GO_BINDATA_PATHS}

echo "Done!"
5 changes: 3 additions & 2 deletions app/server.toml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ path = "/tmp/gnode"
]

[security.cors]
allowed_origins = ["http://localhost:8000"]
allowed_origins = ["*"]
allowed_methods = ["GET", "PUT", "POST"]
allowed_headers = ["Origin", "Accept", "Content-Type", "Authorization"]

Expand Down Expand Up @@ -69,7 +69,8 @@ path = "/tmp/gnode"
[bindata.assets.explorer]
index = "index.html"
public = "/explorer"
private = "github.com/rande/gonode/explorer/dist"
fallback = "/index.html"
private = "github.com/rande/gonode/gui/dist"

[media]
[media.image]
Expand Down
43 changes: 0 additions & 43 deletions assets/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions assets/assets.go

This file was deleted.

Loading