Skip to main content

Run

To actually run a generator you have the run command. This command will first install the generator to your machine if you don't already have it, and then run it.

From command line​

grit <generator-name> [output-directory] [options]

#generator-name: the name of the generator you want to run (required)
#output-directory: the directory name or path you want the generator to output to (optional)

The output directory argument will default to the current working directory.

This command additionally supports many flags that can be used to control the generators behavior:

optionsDescriptionDefault
-d, --debugrun the generator with more loggingfalse
-u, --updatewill force update the generator before runningfalse
-s, --silentrun the generator without any loggingfalse
-c, --clonegit clone repo generators instead of downloading itfalse
-m, --mockmock the generator for testing purposesfalse
-h --hot-rebuildrebuild a local generator when changes are madefalse
--npm-client clientuse a specific npm client ('yarn', 'npm')yarn if avail.
-n --skip-installskip installing dependenciesfalse

From home screen​

Simply using the grit command you can navigate to the Grit home screen. Here you will be shown a list of your already installed generators. Selecting any of these will run it immediately.

grit

image info