Methods
cleanConfig(confirm)
Remove all the configuration files
Parameters:
Name | Type | Description |
---|---|---|
confirm |
Boolean
|
Necessary to force the function. |
clearTasks(gren)
Clears all the tasks that are still running
Parameters:
Name | Type | Description |
---|---|---|
gren |
GithubReleaseNotes
|
convertStringToArray(arrayLike) → {Array}
Converts an array like string to an actual Array, converting also underscores to spaces
Parameters:
Name | Type | Description |
---|---|---|
arrayLike |
string
|
The string of items e.g. "wont_fix, duplicate, bug" |
Returns:
- Type:
-
Array
The items with spaces instead of underscores.
dashToCamelCase(value) → {string}
Transforms a dasherize string into a camel case one.
Parameters:
Name | Type | Description |
---|---|---|
value |
string
|
The dasherize string |
Returns:
- Type:
-
string
The camel case string
formatDate(date) → {string}
Format a date into a string
Parameters:
Name | Type | Description |
---|---|---|
date |
Date
|
Returns:
- Type:
-
string
(private) generate(placeholders, string) → {string}
Generate the templated string based on a placeholders Object
- Since:
- 0.6.0
- Source:
Parameters:
Name | Type | Description |
---|---|---|
placeholders |
Object
|
All the keys/values to update |
string |
string
|
function
|
The string or the function that needs to be replaced |
Returns:
- Type:
-
string
(private) getConfigFromFile(path) → {Object}
Get configuration from the one of the config files
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
Path where to look for config files |
Returns:
- Type:
-
Object
The configuration from the first found file or empty object
(private) getConfigFromRemote(path) → {Object}
get config from remote
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
Path where to look for config files |
Returns:
- Type:
-
Object
The configuration from the first found file or empty object
getFileExtension(filename) → {string}
Return the extension of a filename
Parameters:
Name | Type | Description |
---|---|---|
filename |
string
|
Returns:
- Type:
-
string
(private) getFileNameFromPath(path) → {string}
Get the filename from a path
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
Returns:
- Type:
-
string
getFileTypes() → {Array}
Get the file types for the configuration
Returns:
- Type:
-
Array
getGrenConfig(path) → {Object}
combine getConfigFromRemote & getGrenConfig
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
Path where to look for config files |
Returns:
- Type:
-
Object
The configuration from the first found file or empty object
(private) getRemoteUrl(path) → {string}
judge whether to get config from remote uri
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
Returns:
- Type:
-
string
isInRange(value, min, max) → {Boolean}
Check if e value is between a min and a max
Parameters:
Name | Type | Description |
---|---|---|
value |
number
|
|
min |
number
|
|
max |
number
|
Returns:
- Type:
-
Boolean
printTask(name)
Print a task name in a custom format
Parameters:
Name | Type | Description |
---|---|---|
name |
string
|
The name of the task |
requireConfig(filepath) → {Object|boolean}
Gets the content from a filepath a returns an object
Parameters:
Name | Type | Description |
---|---|---|
filepath |
string
|
Returns:
- Type:
-
Object
|boolean
sortObject(object) → {Object}
Sort an object by its keys
Parameters:
Name | Type | Description |
---|---|---|
object |
Object
|
Returns:
- Type:
-
Object
task(taskName) → {function}
Outputs the task status
Parameters:
Name | Type | Description |
---|---|---|
taskName |
string
|
The task name |
Returns:
- Type:
-
function
The function to be fired when is loaded