Skip to content

Commit f61e4ed

Browse files
mridangclaude
andcommitted
feat: add docs target to Makefile for all 12 languages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c5ecba0 commit f61e4ed

22 files changed

Lines changed: 100 additions & 32 deletions

File tree

src/main/resources/templates/csharp/makefile.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build test format clean
1+
.PHONY: build test format docs clean
22

33
build:
44
dotnet build
@@ -9,5 +9,8 @@ test:
99
format:
1010
dotnet csharpier .
1111

12+
docs:
13+
dotnet build /p:DocumentationFile=docs/api.xml
14+
1215
clean:
1316
dotnet clean

src/main/resources/templates/dart/makefile.mustache

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all get test analyze format clean
1+
.PHONY: all get test analyze format docs clean
22

33
all: get
44

@@ -14,6 +14,10 @@ analyze:
1414
format:
1515
dart format .
1616

17+
docs:
18+
dart doc
19+
1720
clean:
1821
rm -rf .dart_tool/
1922
rm -rf build/
23+
rm -rf doc/

src/main/resources/templates/elixir/makefile.mustache

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install build test lint format clean
1+
.PHONY: install build test lint format docs clean
22

33
install:
44
mix deps.get
@@ -15,6 +15,9 @@ lint: install
1515
format: install
1616
mix format
1717

18+
docs: install
19+
mix docs
20+
1821
clean:
1922
mix clean
20-
rm -rf _build deps
23+
rm -rf _build deps doc

src/main/resources/templates/go/makefile.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all build test lint fmt vet clean
1+
.PHONY: all build test lint fmt vet docs clean
22

33
all: build
44

@@ -17,5 +17,8 @@ fmt:
1717
vet:
1818
go vet ./...
1919

20+
docs:
21+
go doc ./...
22+
2023
clean:
2124
go clean ./...

src/main/resources/templates/java/makefile.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build test lint format analyze clean
1+
.PHONY: build test lint format analyze docs clean
22

33
build:
44
mvn compile -q -B
@@ -15,5 +15,8 @@ format:
1515
analyze:
1616
mvn compile spotbugs:check -q -B
1717

18+
docs:
19+
mvn javadoc:javadoc -q -B
20+
1821
clean:
1922
mvn clean -q -B

src/main/resources/templates/node/makefile.mustache

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install build test lint format typecheck clean
1+
.PHONY: install build test lint format typecheck docs clean
22

33
install:
44
npm install
@@ -18,5 +18,8 @@ format: install
1818
typecheck: install
1919
npx tsc --noEmit
2020

21+
docs: install
22+
npx typedoc --out docs src/
23+
2124
clean:
22-
rm -rf node_modules dist coverage
25+
rm -rf node_modules dist coverage docs

src/main/resources/templates/php/makefile.mustache

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install build test lint format analyze clean
1+
.PHONY: install build test lint format analyze docs clean
22

33
install:
44
composer install --no-interaction --prefer-dist
@@ -17,5 +17,8 @@ format: install
1717
analyze: install
1818
vendor/bin/phpstan analyse
1919

20+
docs: install
21+
vendor/bin/phpdoc run -d lib -t docs
22+
2023
clean:
21-
rm -rf vendor .phpunit.result.cache
24+
rm -rf vendor .phpunit.result.cache docs

src/main/resources/templates/python/makefile.mustache

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install build test lint format typecheck clean
1+
.PHONY: install build test lint format typecheck docs clean
22

33
install:
44
pip install --quiet -e . --group dev
@@ -17,6 +17,9 @@ format: install
1717
typecheck: install
1818
mypy {{packageName}}/
1919

20+
docs: install
21+
pdoc --output-dir docs {{packageName}}
22+
2023
clean:
2124
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
22-
rm -rf .pytest .mypy .ruff
25+
rm -rf .pytest .mypy .ruff docs

src/main/resources/templates/ruby/makefile.mustache

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install build test lint format typecheck clean
1+
.PHONY: install build test lint format typecheck docs clean
22

33
install:
44
bundle install --quiet
@@ -17,5 +17,8 @@ format: install
1717
typecheck: install
1818
bundle exec steep check
1919

20+
docs: install
21+
bundle exec yard doc
22+
2023
clean:
21-
rm -rf .bundle vendor
24+
rm -rf .bundle vendor doc

src/main/resources/templates/rust/makefile.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all build test lint format clean
1+
.PHONY: all build test lint format docs clean
22

33
all: build
44

@@ -14,5 +14,8 @@ build:
1414
test:
1515
cargo test
1616

17+
docs:
18+
cargo doc --no-deps
19+
1720
clean:
1821
cargo clean

0 commit comments

Comments
 (0)