Like the assistant to the famous mad scientist, Dr. Frankenstein, Igor helps to set up and manage everything for internal experiments.
dependency versions
installation
getting your access token
commands
template variables
customization
- Node ----- < v11.7.0
- NPM ------ < v6.5.0
Steps:
- traverse to directory you would like to store the Igor repo.
- run command:
git clone https://github.com/BrooksBellInc/igor.git
- traverse into the newly created directory named: igor
- run command
npm install
(if this is your first time installing the new version of Igor, you will be presented with some prompts requesting your github username, and a github access token (see section "GETTING YOUR ACCESS TOKEN" if you don't know how to find this). This information will be stored in a file called.igorrc
in your home directory.) - run command
npm run build
to generate thebin/igor
file - run command
npm install -g
- confirm installation by running command:
which igor
(if no path prints in the console, something went wrong)
that's it! Igor should now be ready to do your bidding.
Since Igor uses the GitHub API, you are going to need to provide an access token that it will store for later use. If you are unfamiliar with how to generate an access token, you can follow these instruction
Note for step 7, Igor only requires that "repo" and "admin:org" be selected (though you can provide whatever additional permissions you would like) (if you are an admin, I would recommend also including "delete repo" permissions).
Once you have copied the token, you will need to do one of two things:
-
When you install Igor, it looks for a file named .igorrc to exist in your home directory. If that file is not found, you will be presented with a couple of prompts asking for your GitHub credentials. One of these prompts will ask for a token. Paste the token you generated into this prompt and proceed.
-
You may need/want to update your token after installation. Simply open the .igorrc file in your home directory and replace the existing token with your new one.
For a list of available commands, in your terminal, run the command: igor help
If you would like to see further documentation for a specific command, you can use the command|c argument. in your terminal, run either of these commands:
igor help -c [name of command]
igor help --command [name of command]
a list of template variables that are available for use.
{{clientName}}
- the name of the client the test is being created for.{{dateCreated}}
- the date the test is being created (format: YYYY-MM-DD){{testName}}
- the name of the test being created{{username}}
- the username of the user creating the test{{variantName}}
- the name of the variant being creating (for use in variant .js/.scss files only)
{{moduleEntryMethodName}}
- the name of the main entry method for the module{{moduleName}}
- the name of the new module being created{{statefulImport}}
- the import statement forbbmodules/State
. (when added to a template, will only add the import statement if the stateful flag is included with the command){{statefulInit}}
- theinitState
function. (when added to a template, will only add theinitState
function if the stateful flag is included with the command){{statefulInitCall}}
- the call to theinitState
function. (when added to a template, will only add theinitState
function call if the stateful flag is included with the command)
You can customize the colors used for all the messages that the Igor prints to the console.
to customize, all that is needed is to update the 'colors' property within the .igorrc file, located in your home directory.
"colors": {
"title": "cyan",
"gen": "white",
"success": "green",
"warn": "yellow",
"error": "red",
"debug": "gray",
"complete": "rainbow"
}
don't change the keys in this object, only update the color values with one of the color options listed below:
black
red
green
yellow
blue
magenta
cyan
white
gray
grey
rainbow
zebra
america
trap
random
additionally, when you search for repos, Igor will display a limited number of repos if found. if more are found, then you will be instructed to refine your search. The default max is set to 10, but you can increase or decrease this by modifying the maxReposToShow
property in the .igorrc file.