-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
56 lines (47 loc) · 1.54 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#NOTE: Autogenerated template by @beauwilliams
# Declaratively set shell recipes a.k.a commands should run in
set shell := ["bash", "-uc"]
# Load environment variables
set dotenv-load := true
# apikey:
# echo " from .env"
# set positional-arguments := true
# foo:
# echo justinit
# echo
# Colours
RED:= "\\033[31m"
GREEN:= "\\033[32m"
YELLOW:= "\\033[33m"
BLUE:= "\\033[34m"
MAGNETA:= "\\033[35m"
CYAN:= "\\033[36m"
WHITE:= "\\033[37m"
BOLD:= "\\033[1m"
UNDERLINE:= "\\033[4m"
INVERTED_COLOURS:= "\\033[7m"
RESET := "\\033[0m"
NEWLINE := "\n"
# Recipes
default:
@#This recipe will be the default if you run just without an argument, e.g list out available commands
@just --list --unsorted --list-heading $'{{BOLD}}{{GREEN}}Available recipes:{{NEWLINE}}{{RESET}}'
hello:
@#Hide the recipe being run in the output using an @ symbol
@#Here we use our hidden helper to prettify the text
@just _bold_squares "{{YELLOW}}Hello World!"
display:
#By default it prints the recipe that was run in output before outputting result
echo -e "Hello World! {{UNDERLINE}}Here we see the recipe that was run printed also by omitting @ in front of recipe"
whoami $name:
@#Recipe param as env variable with $ sign
echo $name
install *PACKAGES:
@#Recipe param as list of packages
@npm install {{PACKAGES}}
start:
@npm run dev
# Hidden Recipes
_bold_squares message:
@#Hidden recipes have _ in front, i.e these can be helpers such as pretty printer below
@echo -e "{{BOLD}}[{{RESET}}{{message}}{{RESET}}{{BOLD}}]{{RESET}}"