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:
2 files changed
+18
-10
No files matched your search
@@ -8,7 +8,7 @@ permalink: /
|
||||
<p>Run any project.</p>
|
||||
</hgroup>
|
||||
|
||||

|
||||
[](https://codeberg.org/janikvonrotz/taskfile.build/actions?workflow=build.yml) 
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user