Added the documentation tasks to the Makefile file in the project.

This commit is contained in:
2025-09-09 11:52:16 +02:00
parent f981349143
commit 2c5b76d425
+36 -8
View File
@@ -17,14 +17,6 @@ environment ?= .env
include $(environment)
export $(shell sed 's/=.*//' $(environment))
# IDE
open-in-xcode: ## Opens this package with Xcode
@open -a Xcode Package.swift
open-in-vscode: ## Opens this package with Visual Studio Code
@code .
# SWIFT PACKAGE MANAGER
package-build: ## Builds the project locally
@@ -41,6 +33,42 @@ package-reset: ## Resets the complete SPM cache/build folder from the package
package-update: ## Updates the SPM package dependencies
@swift package update
# DOCUMENTATION
doc-generate: doc-generate-xcode doc-generate-github ## Generates the library documentation for both Github and Xcode
doc-generate-github: ## Generates the library documentation for Github
@swift package \
--allow-writing-to-directory $(DOCC_GITHUB_OUTPUT) \
generate-documentation \
--target $(SPM_LIBRARY_TARGET) \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path $(DOCC_GITHUB_BASE_PATH) \
--output-path $(DOCC_GITHUB_OUTPUT)
doc-generate-xcode: ## Generates the library documentation for Xcode
@swift package \
--allow-writing-to-directory $(DOCC_XCODE_OUTPUT) \
generate-documentation \
--target $(SPM_LIBRARY_TARGET) \
--output-path $(DOCC_XCODE_OUTPUT)
doc-preview: ## Previews the library documentation in Safari
@open -a safari $(DOCC_PREVIEW_URL)
@swift package \
--disable-sandbox \
preview-documentation \
--target $(SPM_LIBRARY_TARGET)
# IDE
open-in-xcode: ## Opens this package with Xcode
@open -a Xcode Package.swift
open-in-vscode: ## Opens this package with Visual Studio Code
@code .
# HELP