diff options
| author | Shulhan <ms@kilabit.info> | 2024-05-10 01:39:52 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-09-15 13:26:28 +0700 |
| commit | b1de224b6e28ddeeeeaa90d576f0630c89480ae4 (patch) | |
| tree | bf56de5a1622c6effd457e63549cbad83cdaf6dd | |
| parent | 7e0b412323db013e225cc8122c83cc765e561229 (diff) | |
| download | pakakeh.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-- | Makefile | 24 | ||||
| -rw-r--r-- | index.html | 1 |
2 files changed, 23 insertions, 2 deletions
@@ -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 . @@ -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> |
