Add assets folder so we can serve images (#155)

This commit is contained in:
Jason Meller 2016-09-12 12:11:18 -04:00 committed by GitHub
parent a27752fd2c
commit 5e9f93d08a
6 changed files with 9 additions and 5 deletions

View file

@ -1,5 +1,6 @@
.vscode
build
assets
cli
config
datastore

3
.gitignore vendored
View file

@ -8,6 +8,7 @@ vendor
node_modules
# generated artifacts
assets/bundle.js
server/bindata.go
kitserver/bindata.go
*.cover
@ -15,4 +16,4 @@ kitserver/bindata.go
*.log
# operating system artifacts
.DS_Store
.DS_Store

View file

@ -33,11 +33,11 @@ test-js:
test: lint test-go test-js
generate: .prefix
go-bindata -pkg=server -o=server/bindata.go frontend/templates/ build/
go-bindata -pkg=server -o=server/bindata.go frontend/templates/ assets/ assets/images/
$(shell npm bin)/webpack --progress --colors --bail
generate-dev: .prefix
go-bindata -debug -pkg=server -o=server/bindata.go frontend/templates/ build/
go-bindata -debug -pkg=server -o=server/bindata.go frontend/templates/ assets/ assets/images/
$(shell npm bin)/webpack --progress --colors --bail --watch
deps:
@ -48,6 +48,7 @@ deps:
distclean:
rm -rf build/*
rm -rf assets/bundle.js
rm -rf vendor/*
docker:

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -49,5 +49,5 @@ func ServeFrontend() http.Handler {
}
func ServeStaticAssets(path string) http.Handler {
return http.StripPrefix(path, http.FileServer(newBinaryFileSystem("/build")))
return http.StripPrefix(path, http.FileServer(newBinaryFileSystem("/assets")))
}

View file

@ -29,7 +29,7 @@ var config = {
bundle: path.join(repo, 'frontend/index.jsx')
},
output: {
path: path.join(repo, 'build'),
path: path.join(repo, 'assets'),
publicPath: "/assets/",
filename: '[name].js'
},