Skip to content

Commit bcd4fb1

Browse files
committed
☕ Simplify Makefile
1 parent aaeac55 commit bcd4fb1

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

.github/workflows/udd.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
deno-version: "1.x"
1616
- name: Update dependencies
1717
run: |
18-
make tools
19-
make update > ../output.txt
18+
make deps > ../output.txt
2019
env:
2120
NO_COLOR: 1
2221
- name: Read ../output.txt

Makefile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TOOLS := ${CURDIR}/.tools
1+
TARGETS := $$(find . \( -name '*.ts' -or -name '*.md' \) -not -path './.deno/*')
22

33
.DEFAULT_GOAL := help
44

@@ -7,32 +7,28 @@ help:
77
perl -ne 'print if /^\w+.*##/;' | \
88
perl -pe 's/(.*):.*##\s*/sprintf("%-20s",$$1)/eg;'
99

10-
tools: FORCE ## Install development tools
11-
@mkdir -p ${TOOLS}
12-
@deno install -A -f -n udd --root ${TOOLS} https://deno.land/x/udd@0.7.2/main.ts
13-
1410
fmt: FORCE ## Format code
15-
@deno fmt --ignore=.deno
11+
@deno fmt --config deno.jsonc
1612

1713
fmt-check: FORCE ## Format check
18-
@deno fmt --check --ignore=.deno
14+
@deno fmt --check --config deno.jsonc
1915

2016
lint: FORCE ## Lint code
21-
@deno lint --ignore=.deno
17+
@deno lint --config deno.jsonc
2218

2319
type-check: FORCE ## Type check
24-
@deno test --unstable --no-run $$(find . -name '*.ts' -not -name '.deno')
20+
@deno test --unstable --no-run ${TARGETS}
2521

2622
test: FORCE ## Test
27-
@deno test --unstable -A
23+
@deno test --unstable -A --no-check --jobs
2824

2925
gen: FORCE ## Generate codes
3026
@deno run --unstable -A ./scripts/gen-function/gen-function.ts
3127
@deno run --unstable -A ./scripts/gen-option/gen-option.ts
3228
@make fmt
3329

34-
update: FORCE ## Update dependencies
35-
@${TOOLS}/bin/udd $$(find ./denops_std -name '*.ts' -not -name '.deno')
30+
deps: FORCE ## Update dependencies
31+
@deno run -A https://deno.land/x/udd@0.7.2/main.ts ${TARGETS}
3632
@make fmt
3733

3834
FORCE:

deno.jsonc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"lint": {
3+
"files": {
4+
"exclude": [".deno"]
5+
}
6+
},
7+
"fmt": {
8+
"files": {
9+
"exclude": [".deno"]
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)