-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 1.1 KB
/
Makefile
File metadata and controls
37 lines (29 loc) · 1.1 KB
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
29
30
31
32
33
34
35
36
37
.PHONY: help prod dev clean update-npmjs-readme release publish
help:
@echo "Available targets:"
@echo " - help: Show this help message"
@echo " - prod: Build the project in production mode"
@echo " - dev: Build the project in development mode"
@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
prod: node_modules
npm run prod
dev: node_modules
npm run dev
chmod +x dist/wtc-dev.mjs
clean:
rm -r dist node_modules
release: prod
@read -p "Enter version bump (patch, minor, major): " bump && \
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 dist/README.xml README.adoc
pandoc -f docbook -t gfm dist/README.xml -o README.md
publish: update-npmjs-readme
@git push && \
git push --tags && \
npm publish --otp $$(pass otp services/npmjs.com)