diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f2b7e61 --- /dev/null +++ b/Makefile @@ -0,0 +1,50 @@ +appname := md2vim +sources := $(wildcard *.go) + +build = GOOS=$(1) GOARCH=$(2) go build -o build/$(appname)$(3) +tar = cd build && tar -cvzf $(appname)_$(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3) +zip = cd build && zip $(appname)_$(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3) + +.PHONY: all windows darwin linux clean + +all: windows darwin linux + +clean: + rm -rf build/ + +# linux builds +linux: build/$(appname)_linux_arm.tar.gz build/$(appname)_linux_arm64.tar.gz build/$(appname)_linux_386.tar.gz build/$(appname)_linux_amd64.tar.gz + +build/$(appname)_linux_386.tar.gz: $(sources) + $(call build,linux,386,) + $(call tar,linux,386) + +build/$(appname)_linux_amd64.tar.gz: $(sources) + $(call build,linux,amd64,) + $(call tar,linux,amd64) + +build/$(appname)_linux_arm.tar.gz: $(sources) + $(call build,linux,arm,) + $(call tar,linux,arm) + +build/$(appname)_linux_arm64.tar.gz: $(sources) + $(call build,linux,arm64,) + $(call tar,linux,arm64) + +# darwin builds +darwin: build/$(appname)_darwin_amd64.tar.gz + +build/$(appname)_darwin_amd64.tar.gz: $(sources) + $(call build,darwin,amd64,) + $(call tar,darwin,amd64) + +# windows builds +windows: build/$(appname)_windows_386.zip build/$(appname)_windows_amd64.zip + +build/$(appname)_windows_386.zip: $(sources) + $(call build,windows,386,.exe) + $(call zip,windows,386,.exe) + +build/$(appname)_windows_amd64.zip: $(sources) + $(call build,windows,amd64,.exe) + $(call zip,windows,amd64,.exe) diff --git a/README.md b/README.md index ea07f2d..3269077 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ + + # Md2Vim Writing technical documentation for Vim extensions is not exciting; manually converting what you've just written in @@ -7,8 +16,8 @@ repeatedly for my [Vim-ArgWrap](https://foosoft.net/projects/vim-argwrap/) exten problem with a purpose-built tool. Maintainability, ease of use, and beautiful vimdoc output were primary considerations in Md2Vim's design. -[![Markdown source file](https://foosoft.net/projects/md2vim/img/markdown-thumb.png)](https://foosoft.net/projects/md2vim/img/markdown.png) -[![VimDoc target file](https://foosoft.net/projects/md2vim/img/vimdoc-thumb.png)](https://foosoft.net/projects/md2vim/img/vimdoc.png) +[![Markdown source file](img/markdown-thumb.png)](img/markdown.png) +[![VimDoc target file](img/vimdoc-thumb.png)](img/vimdoc.png) ## Installation @@ -18,15 +27,7 @@ If you already have the Go environment and toolchain set up, you can get the lat $ go get github.com/FooSoft/md2vim ``` -Otherwise, you can use the pre-built binaries for the platforms below: - -* [md2vim\_darwin\_386.tar.gz](https://foosoft.net/projects/md2vim/dl/md2vim_darwin_386.tar.gz) -* [md2vim\_darwin\_amd64.tar.gz](https://foosoft.net/projects/md2vim/dl/md2vim_darwin_amd64.tar.gz) -* [md2vim\_linux\_386.tar.gz](https://foosoft.net/projects/md2vim/dl/md2vim_linux_386.tar.gz) -* [md2vim\_linux\_amd64.tar.gz](https://foosoft.net/projects/md2vim/dl/md2vim_linux_amd64.tar.gz) -* [md2vim\_linux\_arm.tar.gz](https://foosoft.net/projects/md2vim/dl/md2vim_linux_arm.tar.gz) -* [md2vim\_windows\_386.tar.gz](https://foosoft.net/projects/md2vim/dl/md2vim_windows_386.tar.gz) -* [md2vim\_windows\_amd64.tar.gz](https://foosoft.net/projects/md2vim/dl/md2vim_windows_amd64.tar.gz) +Otherwise, you can use the [pre-built binaries](https://github.com/FooSoft/md2vim/releases) from the project page. ## Usage diff --git a/img/markdown-thumb.png b/img/markdown-thumb.png new file mode 100644 index 0000000..8f91e1b Binary files /dev/null and b/img/markdown-thumb.png differ diff --git a/img/markdown.png b/img/markdown.png new file mode 100644 index 0000000..ba09967 Binary files /dev/null and b/img/markdown.png differ diff --git a/img/vimdoc-thumb.png b/img/vimdoc-thumb.png new file mode 100644 index 0000000..ec2ae37 Binary files /dev/null and b/img/vimdoc-thumb.png differ diff --git a/img/vimdoc.png b/img/vimdoc.png new file mode 100644 index 0000000..de240ef Binary files /dev/null and b/img/vimdoc.png differ