Methods
(inner) convertFileSize(size) → {string}
convert file size B -> kB/MB
Parameters:
Name | Type | Description |
---|---|---|
size |
number | env variables |
- Source:
Returns:
file size B/kB/MB
- Type
- string
Example
convertFileSize(size)
(inner) endTask(options)
End task console message with date, title, time and filelist if present
Parameters:
Name | Type | Description |
---|---|---|
options |
EndTask | EndTask options |
- Source:
Returns:
undefined
Example
utils.endTask({taskName: 'Compile CSS', timeStart: 1663932841247 })
(inner) endTaskGroup(options)
End group of tasks console message with date, title and time
Parameters:
Name | Type | Description |
---|---|---|
options |
EndTask | End task options |
- Source:
Returns:
undefined
Example
utils.endTaskGroup({ taskName: 'Build task', timeStart: 1663932841247 })
(inner) startTask(taskName) → {number}
Show in console start task message with timestamp
Parameters:
Name | Type | Description |
---|---|---|
taskName |
string | task name |
- Source:
Returns:
timestamp
- Type
- number
Example
const timeStart = utils.startTask('Compile CSS')
(inner) startTaskGroup(taskName) → {number}
Show in console start task group message with timestamp
Parameters:
Name | Type | Description |
---|---|---|
taskName |
string | Task name |
- Source:
Returns:
timestart timestamp
- Type
- number
Example
const timeStart = utils.startTaskGroup('Build task')
Type Definitions
EndTask
end task/tasks options
Type:
- object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
files |
Array.<THEME_FILE_INFO> |
<optional> |
file list |
taskName |
string | ||
timeStart |
number |
- Source:
THEME_FILE_INFO
File Info
Type:
- object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string |
<optional> |
|
path |
string |
<optional> |
|
dist |
string |
<optional> |
|
size |
string |
<optional> |
- Source: