Skip to content

Instantly share code, notes, and snippets.

@samdfonseca
Last active November 13, 2016 08:19
Show Gist options
  • Save samdfonseca/022a8a21daf23ec1d7781812d9d91104 to your computer and use it in GitHub Desktop.
Save samdfonseca/022a8a21daf23ec1d7781812d9d91104 to your computer and use it in GitHub Desktop.
This repository contains the default Taskfile template for getting started in your own projects. A Taskfile is a bash (or zsh etc.) script that follows a specific format. It's called Taskfile, sits in the root of your project and contains the tasks to build your project.
#!/usr/bin/env bash
# Quick start with the default Taskfile template
# alias run-init="curl -so Taskfile https://gist.githubusercontent.com/samdfonseca/022a8a21daf23ec1d7781812d9d91104/raw/d2f6dfaaf0a9e72852f7a3b31d22998b445ef0bb/Taskfile.template && chmod +x Taskfile"
# Run your tasks like: run <task>
# alias run=./Taskfile
PATH=./node_modules/.bin:$PATH
function install {
echo "install task not implemented"
}
function build {
echo "build task not implemented"
}
function start {
echo "start task not implemented"
}
function default {
start
}
function help {
echo "$0 <task> <args>"
echo "Tasks:"
compgen -A function | cat -n
}
TIMEFORMAT="Task completed in %3lR"
time ${@:-default}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment