-
Notifications
You must be signed in to change notification settings - Fork 183
Available Commands
In this section:
generamba setup
Run this command to configure current project to use Generamba. It will ask you series of questions and generate Rambafile
as an output. All of your answers can be changed afterwards by manually modifying this file.
generamba gen [MODULE_NAME] [TEMPLATE_NAME]
Use this command to create new modules from the specified template.
Note that you should run it in the same directory where Rambafile
is located.
-
MODULE_NAME
- this is your code module name. It's used in a lot of different places - in subfolders, Xcode groups, filenames, and in your classes names. Choose it wisely! -
TEMPLATE_NAME
- this is a name of the template you want to use for creating new module. Note that this template should be explicitly listed in theRambafile
and installed viageneramba template install
command.
-
--description
- Provides a description for generated module. This text will be pasted in place of{{ description }}
variable of the selected template.Example:
generamba gen AuthModule viper_template --description 'Super Awesome VIPER module'
Note: If no description is provided, the default one will be used:
YOUR_MODULE_NAME module
-
--author
- Provides an author name for generated module. This text will be pasted in place of{{ developer.name }}
variable of the selected template.Example:
generamba gen AuthModule viper_template --author 'Egor Tolstoy'
-
--project_targets
- Specifies a number of project targets for adding new files.Example:
generamba gen FeedModule viper_template --project_targets 'News,NewsTests,NewsUITests'
-
--project_file_path
- A relative path to the folder, where new module will be generated. Don't include your module subfolder in the path - it's created by default.Example:
generamba gen UserService service_template --project_file_path '/Facebook/Code/Services'
-
--project_group_path
- An absolute path in Xcode groups hierarchy to the group, where new module will be generated. Don't include your module subgroup in the path - it's created by default.Example:
generamba gen UserService service_template --project_group_path 'Facebook/Services'
-
--module_path
- This option just combines--project_file_path
and--project_group_path
. If you use the same paths both in the filesystem and Xcode, you should use this flag.Example:
generamba gen AppDelegate app_delegate_template --module_path 'Facebook/Code'
-
--test_targets
- Specifies a number of test targets for adding new test files.Example:
generamba gen FeedModule viper_template --test_targets 'NewsTests,NewsUITests'
-
--test_file_path
- A relative path to the folder, where new test files will be generated. Don't include your module subfolder in the path - it's created by default.Example:
generamba gen UserService service_template --test_file_path '/Facebook/Tests/Services'
-
--test_group_path
- An absolute path in Xcode groups hierarchy to the group, where new tests will be generated. Don't include your module subgroup in the path - it's created by default.Example:
generamba gen UserService service_template --test_group_path 'Facebook/Tests/Services'
-
--test_path
- This option just combines--test_file_path
and--test_group_path
. If you use the same paths both in the filesystem and Xcode, you should use this flag.Example:
generamba gen AppDelegate app_delegate_template --test_path 'Facebook/Tests'
-
--custom_parameters
- A hash with custom parameters that will be used in place of{{ custom_parameters.key }}
directives in a template.Example:
generamba gen AppDelegate app_delegate_template --custom_parameters key1:value1 key2:value2
generamba version
Run this command to get an information about current Generamba release. It will show you the current version, release date and a link to release notes.
generamba template create [TEMPLATE_NAME]
Use this command if you want to create a new template to either use it in your project, or publish it for other people needs. It will ask you some questions and generate a skeleton of the new template with a .rambaspec
file and basic template file structure.
This command is project-independent, so you can run it in any directory you want.
-
TEMPLATE_NAME
- this value will be used as a template name during generation process.
generamba template create hexagonal_module_template
generamba template install
Run this command in the same directory where Rambafile
is located to install the list of templates specified under templates
key in the Rambafile
. The execution may take some time, because we download and create local copies of templates and catalog repositories.
If you use this command more than one time, the previous content of the /Templates
directory would be overwritten.
generamba template list
Prints out the list of all templates available in the shared Generamba GitHub catalog.
generamba template search [SEARCH_STRING]
Searches a template with a given name in the shared Generamba GitHub catalog.
generamba template search viper