recipe

Parameters:
Name Type Required Default Hint
recipeFile string true The name of the recipe file to execute including extension. Any text file may be used.

Command Usage

The recipe commands allows you to execute a collection of CommandBox commands
usually in a file.boxr recipe file. CommandBox will iterate and execute each
of the commands for you in succession. Lines that start with a # followed by whitespace will be ignored as comments.

recipe myRecipe.boxr
You can also bind the recipe with arguments that will be replaced inside of your recipe.
Pass any arguments as additional parameters to the recipe command.
Named arguments will be accessable inside the recipe as $arg1Name, $arg2Name, etc.
Positional args will be avaialble as $1, $2, etc.

Recipe will receive $name and $action
recipe recipeFile=buildSite.boxr name=luis action=create
Recipe will receive $1 and $2
recipe buildSite.boxr luis create
When using args inside a recipe, you will need to wrap the arg in quotes if it may contain a space

$arg1 may contain spaces
rm "$arg1"
If an argument is not bound, no error will be thrown, and the name of the argument will be left in the command.

You can use "echo on" and "echo off" in recipes to control whether the commands output to the console as they are executed.
This can be useful for debugging or confirming the success of commands with no output. Echo is on by default.
Note, "echo off" doesn't suppress the output of the commands, just the printing of the command and its arguments prior to execution.
This does not use the actual "echo" command and is a feature that only applies during the execution of recipes.
echo on

# Now you see me
echo off
# Now you don't