Add help to Makefile

This commit is contained in:
Marko Korhonen 2023-11-14 18:57:44 +02:00
parent b7a5839216
commit 1eb65c28a0
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890

View file

@ -1,11 +1,19 @@
.PHONY: build clean update-npmjs-readme release publish
.PHONY: help build clean update-npmjs-readme release publish
build: node_modules
npm run build
help:
@echo "Available targets:"
@echo " - help: Show this help message"
@echo " - build: Build the project"
@echo " - clean: Remove build artifacts"
@echo " - release: Create a new release version"
@echo " - publish: Publish the new version created with the release target"
node_modules:
npm install
build: node_modules
npm run build
clean:
rm -r target node_modules
@ -14,7 +22,6 @@ release:
version=$$(npm version $$bump | grep -oP "(?<=v)[^']+") && \
echo "Version $$version created. Run 'make publish' to push the changes and publish the package."
update-npmjs-readme:
asciidoctor -b docbook -o target/README.xml README.adoc
pandoc -f docbook -t markdown_strict target/README.xml -o README.md