(Quick Reference)
create-script
Purpose
The
create-script command will create a new Griffon executable script that can be run with the
griffon command from a terminal window.
Examples
The command:
griffon create-script execute-report
Creates a script called
scripts/ExecuteReport.groovy such as:
target('default': "The description of the script goes here!") {
doStuff()
}
target(doStuff: "The implementation task") {
// logic here
}The command can then be run with:
Description
The command will translate lower case command names, separated by hyphens into a valid Groovy class name with camel case. For example
create-mvc would become a script called
scripts/CreateMvc.groovy.
The script generated is a
Gant script which can use Gant's capabilities to depend on other scripts from Griffon core. Refer to the section on
Creating Gant Scripts in the user guide.
Usage:
griffon create-script [name]
Arguments:
name - The name of the script to create.
Options:
archetype - The name of an archetype. Defaults to default.
script - The name of the script template. Defaults to Script.
with-command-support - Creates additional files required for shell options and help.