References
Function Summary
| Static Public Function Summary | ||
| public |
addPadding(string: string, length: number): string Pads a string to a given length with spaces. |
|
| public |
appendConfig(configObject: rocConfig): rocConfig Appends to the configuration object. |
|
| public |
appendSettings(settingsObject: rocSettings): rocSettings Appends settings to the configuration object. |
|
| public |
buildCompleteConfig(debug: boolean, config: rocConfig, meta: rocMetaConfig, newConfig: rocConfig, newMeta: rocMetaConfig, directory: string, validate: boolean): Object Builds the complete configuration objects. |
|
| public |
buildDocumentationObject(initalObject: Object, meta: rocMetaSettings, initalFilter: string[]): rocDocumentationObject Creates a rocDocumentationObject. |
|
| public |
Formats a string suitable for error output. |
|
| public |
errorLabel(text: string): string Formats a string suitable for error labels. |
|
| public |
Executes a command string. |
|
| public |
fileExists(filepath: string, directory: string): boolean Verifys if a file exists. |
|
| public |
generateCommandDocumentation(settings: rocConfig, commands+meta: rocMetaConfig, command: string, name: string): string Generates a string with information about a specific command. |
|
| public |
generateCommandsDocumentation(commands: rocConfig, commandsmeta: rocMetaConfig): string Generates a string with information about all the possible commands. |
|
| public |
generateMarkdownDocumentation(config: rocConfig, metaConfig: rocMetaConfig, filter: string[]): string Generates markdown documentation for the provided configuration object. |
|
| public |
generateTable(initalDocumentationObject: rocDocumentationObject, header: rocTableHeader, settings: rocTableSettings): string Creates a table based on a rocDocumentationObject. |
|
| public |
generateTextDocumentation(config: rocConfig, metaConfig: rocMetaConfig, filter: string[]): string Generates plain text documentation for the provided configuration object. |
|
| public |
Fetches the tarball for a repository on Github. |
|
| public |
getAbsolutePath(filepath: string, directory: string): string Makes a path absolute if not already is that. |
|
| public |
getApplicationConfig(applicationConfigPath: string, directory: string, debug: boolean): object Gets the application configuration by reading a file. |
|
| public |
Gets the current configuration object. |
|
| public |
getDefaultValue(object: Object): string | null Converts an object to a string. |
|
| public |
getMappings(documentationObject: rocDocumentationObject): Object Creates mappings between cli commands to their "path" in the configuration structure, their validator and type convertor. |
|
| public |
getPackageJson(directory: string): Object | undefined Reads a |
|
| public |
getRocDependencies(packageJson: Object): string[] Gets the Roc dependencies from a |
|
| public |
getSettings(key: string): rocSettings | Object Gets the settings in the configuration object. |
|
| public |
getSuggestions(current: string[], possible: string[], command: boolean): string Will create a string with suggestions for possible typos. |
|
| public |
getVersions(packageName: string): object[] Fetches an array of all the tags for a Github repo, used as possible versions for a template. |
|
| public |
Formats a string suitable for important messages. |
|
| public |
importantLabel(text: string): string Formats a string suitable for important labels. |
|
| public |
init(parsedArguments: rocCommandObject): Promise Command used to init a new Roc project. |
|
| public |
Validates an array using a validator. |
|
| public |
isArrayOrSingle(validator: function | RegExp): function Validates an pontential array using a validator. |
|
| public |
Validates an string. |
|
| public |
Validates an string. |
|
| public |
Validates an object using a validator. |
|
| public |
Validates an string. |
|
| public |
Validates an string. |
|
| public |
Helper to use a validator. |
|
| public |
Merges two configuration objects. |
|
| public |
Formats a string suitable for confirmations. |
|
| public |
Formats a string suitable for confirmation labels. |
|
| public |
Validates against a list of validators. |
|
| public |
Returns a string to pad with. |
|
| public |
parseArguments(args: Object, mappings: Object): Object Converts a set of arguments to rocConfigSettings object. |
|
| public |
parseOptions(command: string, commands: Object, options: Object[]): Object Parses options and validates them. |
|
| public |
Marks that the value is required |
|
| public |
runCli(info: {version: string, name: string}, initalConfig: rocConfig, initalMeta: rocMetaConfig, args: string[]): undefined Invokes the Roc cli. |
|
| public |
throwError(name: string, message: string, value: object, type: string) Throws error for failed validations. |
|
| public |
Takes a configuration path array and convertes it to a cli flag. |
|
| public |
validRocProject(directory: string): boolean Validates if a directory seems to be a Roc application project. |
|
| public |
validate(settings: rocSettings, metaSettings: rocMetaSettings, toValidate: array | boolean) Validates the provided configuration object. |
|
| public |
validateMightThrow(settings: rocSettings, validations: Object) Validates the provided configuration object. |
|
| public |
Formats a string suitable for warnings. |
|
| public |
warningLabel(text: string): string Formats a string suitable for warning labels. |
|
Variable Summary
| Static Public Variable Summary | ||
| public |
The default prompt options. |
|
Typedef Summary
| Static Public Typedef Summary | ||
| public |
Validator info object. |
|
| public |
Validator info object. |
|
| public |
Roc config object. |
|
| public |
Roc documentation object. |
|
| public |
Roc map object. |
|
| public |
Roc meta config object. |
|
| public |
Roc meta settings object. |
|
| public |
Roc meta settings object. |
|
| public |
Roc parsed options. |
|
| public |
Roc settings object. |
|
| public |
Roc table header object. |
|
| public |
Roc table settings object. |
|