From b1de224b6e28ddeeeeaa90d576f0630c89480ae4 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Fri, 10 May 2024 01:39:52 +0700 Subject: 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. --- Makefile | 24 ++++++++++++++++++++++-- index.html | 1 + 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 ## 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 @@ +

README

Editor

Input

Notification

-- cgit v1.3