Griffon Guide 0.9.5-rc2 - Reference Documentation

# 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:

    griffon execute-report

## 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 Command Line Scripting 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.