From 500446d5ceed0f51cc99247f6dc2c9209b7f84cd Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Mon, 21 Apr 2025 18:42:03 +0100 Subject: [PATCH] Add tooling to preview README locally --- mise.toml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/mise.toml b/mise.toml index 328956ec..437a952f 100644 --- a/mise.toml +++ b/mise.toml @@ -54,6 +54,18 @@ description = 'Show outdated mix dependencies' run = ['mix hex.outdated --all'] hide = true +# TOOLING + +[tasks.gh-markdown-preview-extension-install] +description = 'Install a gh extension to preview GH-flavoured markdown files locally' +run = ['gh extension install thiagokokada/gh-gfm-preview'] +hide = true + +[tasks.gh-markdown-preview-extension-update] +description = 'Update the gh extension to preview GH-flavoured markdown files locally' +run = ['gh extension upgrade gfm-preview'] +hide = true + # PUBLIC TASKS # DEPENDENCIES @@ -63,7 +75,12 @@ depends = ['npm-outdated', 'tailwind-outdated', 'mix-outdated'] description = 'Show outdated dependencies' [tasks."deps:update"] -depends = ['npm-update', 'tailwind-update', 'mix-update'] +depends = [ + 'npm-update', + 'tailwind-update', + 'mix-update', + 'gh-markdown-preview-extension-update', +] description = 'Update dependencies' # SETUP @@ -77,7 +94,11 @@ mix hex.repo add fluxon https://repo.fluxonui.com \ """ [tasks."dev:setup"] -depends = ['npm-install', 'fluxon-add-repo'] +depends = [ + 'npm-install', + 'fluxon-add-repo', + 'gh-markdown-preview-extension-install', +] description = 'Install dependencies and setup the database' run = ['mix setup'] @@ -129,6 +150,10 @@ run = 'mix test' description = 'Run the application attached to an IEx console' run = 'iex -S mix phx.server' +[tasks."dev:readme-preview"] +description = 'Preview the README file via a GH flavoured markdown rendered' +run = 'gh gfm-preview README.md' + # DOCKER [tasks."docker:build"]