aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-05-10 01:39:52 +0700
committerShulhan <ms@kilabit.info>2024-09-15 13:26:28 +0700
commitb1de224b6e28ddeeeeaa90d576f0630c89480ae4 (patch)
treebf56de5a1622c6effd457e63549cbad83cdaf6dd
parent7e0b412323db013e225cc8122c83cc765e561229 (diff)
downloadpakakeh.ts-b1de224b6e28ddeeeeaa90d576f0630c89480ae4.tar.xz
make: add task to install tools and serve the HTML and docs
The "install-tools" task install the ciigo binary using Go tools into user's ${GOBIN}. The "serve" task serve the HTML files for local development and automatically convert ".md" files to HTML for previewing.
-rw-r--r--Makefile24
-rw-r--r--index.html1
2 files changed, 23 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1266d02..a13d8b0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
## SPDX-FileCopyrightText: 2021 M. Shulhan <ms@kilabit.info>
## SPDX-License-Identifier: GPL-3.0-or-later
+GOBIN=$(shell go env GOBIN)
+
.PHONY: all
all: build lint
@@ -10,8 +12,26 @@ lint:
.PHONY: build
build:
- tsc --outDir .
+ npx tsc --outDir .
.PHONY: watch
watch:
- tsc --outDir . --watch
+ npx tsc --outDir . --watch
+
+
+## install third party tools required for developmet.
+
+.PHONY: install-tools
+install-tools: $(GOBIN)/ciigo
+ echo "GOBIN: $(GOBIN)"
+
+$(GOBIN)/ciigo:
+ go install git.sr.ht/~shulhan/ciigo/cmd/ciigo@latest
+
+
+## serve the HTML files for local development and automatically convert
+## ".md" files to HTML for previewing.
+
+.PHONY: serve
+serve:
+ ciigo -exclude="(node_modules)" -address=127.0.0.1:4578 serve .
diff --git a/index.html b/index.html
index 93cfdaa..32b8c3a 100644
--- a/index.html
+++ b/index.html
@@ -9,6 +9,7 @@
</head>
<body>
+ <h3><a href="/README.html"> README </a></h3>
<h3><a href="/editor"> Editor </a></h3>
<h3><a href="/input"> Input </a></h3>
<h3><a href="/notif"> Notification </a></h3>