generated from S1M0N38/base.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 845 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.PHONY: test lint docs init
TESTS_DIR := tests/
PLUGIN_DIR := lua/
DOC_GEN_SCRIPT := ./scripts/docs.lua
MINIMAL_INIT := ./scripts/minimal_init.vim
test:
nvim --headless --noplugin -u ${MINIMAL_INIT} \
-c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${MINIMAL_INIT}' }"
lint:
luacheck ${PLUGIN_DIR}
docs:
nvim --headless --noplugin -u ${MINIMAL_INIT} \
-c "luafile ${DOC_GEN_SCRIPT}" -c 'qa'
init:
@nvim --headless --noplugin \
-c "vimgrep /my_awesome_plugin/gj **/*.lua **/*.vim Makefile" \
-c "cfdo %s/my_awesome_plugin/$(name)/ge | update" \
-c "qa"
@find . -depth -type d -name '*my_awesome_plugin*' | \
while read dir; do mv "$$dir" "$${dir//my_awesome_plugin/$(name)}"; done
@find . -type f -name '*my_awesome_plugin*' | \
while read file; do mv "$$file" "$${file//my_awesome_plugin/$(name)}"; done