feat(task): add clone-taskfile command and update dev-11ty to open browser

- Introduce `clone-taskfile` function to manage taskfile repository cloning and pulling
- Modify `dev-11ty` command to automatically open the browser at `http://localhost:8080/`
- Reorder static variable declarations for better script organization
- Improve output formatting with colored Git status messages
This commit is contained in:
Janik von Rotz committed 2025-11-21 09:04:35 +01:00
1 parent ac64a25871
commit 600dbea955
2 files changed
+18 -10

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ permalink: /
<p>Run any project.</p>
</hgroup>
![Vercel](https://vercelbadge.vercel.app/api/janikvonrotz/taskfile.build)
[![.forgejo/workflows/build.yml](https://codeberg.org/janikvonrotz/taskfile.build/badges/workflows/build.yml/badge.svg)](https://codeberg.org/janikvonrotz/taskfile.build/actions?workflow=build.yml) ![Vercel](https://vercelbadge.vercel.app/api/janikvonrotz/taskfile.build)
---
+17 -9
View File
@@ -37,14 +37,15 @@ help() {
echo
}
# Static vars
BUILDX_PLATFORM="linux/amd64"
CONTAINER_REGISTRY="janikvonrotz"
CONTAINER_TAG="taskfile.build:latest"
DOCKERFILE="image/Dockerfile"
# Import commands
clone-taskfile(){
if [[ ! -d "$HOME/taskfile.build" ]]; then
echo -e '\033[38;5;214mGit\033[0m: Clone taskfile repo'
git clone https://git.taskfile.build "$HOME/taskfile.build"
else
echo -e '\033[38;5;214mGit\033[0m: Pull taskfile repo'
git -C "$HOME/taskfile.build" pull
fi
}
if [[ -d "$HOME/taskfile.build/bin" ]]; then
for file in "$HOME/taskfile.build/bin/"*; do
@@ -54,6 +55,13 @@ if [[ -d "$HOME/taskfile.build/bin" ]]; then
done
fi
# Static vars
BUILDX_PLATFORM="linux/amd64"
CONTAINER_REGISTRY="janikvonrotz"
CONTAINER_TAG="taskfile.build:latest"
DOCKERFILE="image/Dockerfile"
# Project commands
run() {
@@ -70,7 +78,7 @@ install() {
}
dev-11ty() {
pnpm dlx @11ty/eleventy --serve
open-with-os 'http://localhost:8080/' & pnpm dlx @11ty/eleventy --serve
}
lint() {