|
| 1 | +--- |
| 2 | +id: version-0.4-cli-command-generate |
| 3 | +title: rg generate |
| 4 | +original_id: cli-command-generate |
| 5 | +--- |
| 6 | + |
| 7 | +Generates and/or modifies files based on a task. |
| 8 | + |
| 9 | +rg **generate** `<task>` `<name>` [_options_] |
| 10 | + |
| 11 | +rg **g** `<task>` `<name>` [_options_] |
| 12 | + |
| 13 | +## Description |
| 14 | + |
| 15 | +It generates the required element based on the task name. |
| 16 | + |
| 17 | +> Note that, for now we are only supporting **component, style** generating task. |
| 18 | +
|
| 19 | +## Arguments |
| 20 | + |
| 21 | +Argument | Description | |
| 22 | +---------|----------| |
| 23 | + _task_ | The task or collection of tasks to generate. Check the [currently supported tasks](#task-commands). | |
| 24 | + |
| 25 | +## Options |
| 26 | + |
| 27 | +Argument | Description | |
| 28 | +---------|----------| |
| 29 | +--style=scss | Generates specific stylesheet file along with the component. NOTE THAT: WE ARE ONLY SUPPORTING SCSS FILE FOR NOW. | |
| 30 | +--help | Shows a help message for this command in the console. | |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +## Task commands |
| 35 | + |
| 36 | +### Component |
| 37 | + |
| 38 | +rg generate **component** `<name>` [_options_] |
| 39 | + |
| 40 | +rg g **component** `<name>` [_options_] |
| 41 | + |
| 42 | +#### Description |
| 43 | + |
| 44 | +Creates a new generic component definition in the given or default project. |
| 45 | + |
| 46 | +The component will be created in the current working directory. |
| 47 | + |
| 48 | +#### Arguments |
| 49 | + |
| 50 | +Argument | Description | |
| 51 | +---------|----------| |
| 52 | + _name_ | The name of the component. | |
| 53 | + |
| 54 | +### Style |
| 55 | + |
| 56 | +rg generate **style** `<name>` [_options_] |
| 57 | + |
| 58 | +rg g **style** `<name>` [_options_] |
| 59 | + |
| 60 | +#### Description |
| 61 | + |
| 62 | +Creates a new stylesheet file in the given or default project. |
| 63 | + |
| 64 | +The stylesheet will be created in the current working directory. |
| 65 | + |
| 66 | +> WE ARE ONLY SUPPORTING `SCSS` FILE FOR NOW. |
| 67 | +
|
| 68 | +#### Arguments |
| 69 | + |
| 70 | +Argument | Description | |
| 71 | +---------|----------| |
| 72 | + _name_ | The name of the stylesheet. | |
0 commit comments