mirror of
https://github.com/maputnik/editor.git
synced 2026-02-02 18:50:02 +00:00
Add Makefile
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -22,3 +22,9 @@ _testmain.go
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
|
||||
# Bindata
|
||||
bindata_assetfs.go
|
||||
|
||||
# Built binary
|
||||
maputnik
|
||||
|
||||
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[submodule "editor"]
|
||||
path = editor
|
||||
url = git@github.com:maputnik/editor.git
|
||||
branch = master
|
||||
21
Makefile
Normal file
21
Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
SOURCEDIR=.
|
||||
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
|
||||
BINARY=maputnik
|
||||
|
||||
all: $(BINARY)
|
||||
|
||||
$(BINARY): $(SOURCES)
|
||||
go build -o ${BINARY}
|
||||
|
||||
editor/node_modules:
|
||||
cd editor && npm install
|
||||
|
||||
editor/public: editor/node_modules
|
||||
cd editor && npm run build
|
||||
|
||||
bindata_assetfs.go: editor/public
|
||||
go-bindata-assetfs editor/public/
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf editor/public && rm -rf maputnik
|
||||
23
README.md
23
README.md
@@ -1,26 +1,21 @@
|
||||
# desktop
|
||||
A Golang based cross platform executable for integrating Maputnik locally
|
||||
# Maputnik Desktop
|
||||
|
||||
A Golang based cross platform executable for integrating Maputnik locally.
|
||||
|
||||
### Build
|
||||
|
||||
First you need a app bundle distribution of Maptunik and copy over `public`
|
||||
to the `gui` folder in this project.
|
||||
Clone the repository recursively since the Maputnik editor is embedded
|
||||
as submodule.
|
||||
|
||||
```
|
||||
npm run dist
|
||||
git clone --recursive git@github.com:maputnik/desktop.git
|
||||
```
|
||||
|
||||
Package the the `gui` as binary assets.
|
||||
Run `make` to build the app distribution bundle and create the `maputnik` binary
|
||||
embedding the editor.
|
||||
|
||||
```
|
||||
go get github.com/elazarl/go-bindata-assetfs/...
|
||||
go-bindata-assetfs gui/...
|
||||
```
|
||||
|
||||
Install the go package.
|
||||
|
||||
```
|
||||
go install
|
||||
make
|
||||
```
|
||||
|
||||
You should now find the `maputnik` binary in your directory.
|
||||
|
||||
1
editor
Submodule
1
editor
Submodule
Submodule editor added at 3b59e54b2a
Reference in New Issue
Block a user