diff --git a/Makefile b/Makefile deleted file mode 100644 index 95e046b..0000000 --- a/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -.PHONY: all test test-color coverage coverage-cli coverate-html lint format build clean - -all: - go mod tidy - $(MAKE) format - $(MAKE) test-color - $(MAKE) lint - $(MAKE) build - $(MAKE) clean - -test: - go test -race -failfast ./... - -test-color: - # go install github.com/haunt98/go-test-color@latest - go-test-color -race -failfast ./... - -coverage: - go test -coverprofile=coverage.out ./... - -coverage-cli: - $(MAKE) coverage - go tool cover -func=coverage.out - -coverage-html: - $(MAKE) coverage - go tool cover -html=coverage.out - -lint: - golangci-lint run ./... - -format: - # go install github.com/haunt98/gofimports/cmd/gofimports@latest - # go install mvdan.cc/gofumpt@latest - # go install mvdan.cc/sh/v3/cmd/shfmt@latest - gofimports -w --company github.com/make-go-great,github.com/haunt98 . - gofumpt -w -extra . - shfmt -w -s -i 4 ./scripts ./data/zsh - -build: - $(MAKE) clean - go build ./cmd/dot - -clean: - rm -rf dot diff --git a/data/nvim/init.lua b/data/nvim/init.lua index 8d7df65..30e5cb8 100644 --- a/data/nvim/init.lua +++ b/data/nvim/init.lua @@ -430,6 +430,7 @@ require("lazy").setup({ "go", "javascript", "json", + "just", "lua", "make", "markdown", @@ -451,6 +452,7 @@ require("lazy").setup({ go = { "gofumpt" }, javascript = { "deno_fmt" }, json = { "deno_fmt" }, + just = { "just" }, lua = { "stylua" }, markdown = { "deno_fmt" }, proto = { "buf" }, diff --git a/data/zsh/bottom-zshrc b/data/zsh/bottom-zshrc index b2b9f03..c8a6488 100644 --- a/data/zsh/bottom-zshrc +++ b/data/zsh/bottom-zshrc @@ -136,6 +136,11 @@ if command -v fnm &>/dev/null; then eval "$(fnm env --use-on-cd)" fi +# https://github.com/casey/just +if command -v just &>/dev/null; then + alias jst="just" +fi + # https://github.com/crate-ci/typos if command -v typos &>/dev/null; then alias typo="typos --config ~/.config/typos/typos.toml" diff --git a/justfile b/justfile new file mode 100644 index 0000000..9f477f3 --- /dev/null +++ b/justfile @@ -0,0 +1,37 @@ +all: tidy format test-color lint build clean + +tidy: + go mod tidy + +test: + go test -race -failfast ./... + +test-color: + # go install github.com/haunt98/go-test-color@latest + go-test-color -race -failfast ./... + +coverage: + go test -coverprofile=coverage.out ./... + +coverage-cli: coverage + go tool cover -func=coverage.out + +coverage-html: coverage + go tool cover -html=coverage.out + +lint: + golangci-lint run ./... + +format: + # go install github.com/haunt98/gofimports/cmd/gofimports@latest + # go install mvdan.cc/gofumpt@latest + # go install mvdan.cc/sh/v3/cmd/shfmt@latest + gofimports -w --company github.com/make-go-great,github.com/haunt98 . + gofumpt -w -extra . + shfmt -w -s -i 4 ./scripts ./data/zsh + +build: + go build ./cmd/dot + +clean: + rm -rf dot