TypeDocTask
@codification/cutwater-build-core > TypeDocTask
Class
beta:
Hierarchy
↳ BaseTypeDocTask<TypeDocConfig>
↳ TypeDocTask
Implements
IExecutable
Constructors
Properties
Methods
- _getConfigFilePath
- copyFile
- execute
- executeTask
- fileError
- fileExists
- fileWarning
- getCleanMatch
- isEnabled
- loadSchema
- log
- logError
- logVerbose
- logWarning
- mergeConfig
- onRegister
- readJSONSync
- replaceConfig
- resolvePath
- setConfig
Constructors
constructor
⊕ new TypeDocTask(packageName?: undefined
| string
): TypeDocTask
Overrides BaseTypeDocTask.constructor
Defined in TypeDocTask.ts:23
Parameters:
Name | Type | |
---|---|---|
Optional packageName | undefined \ | string |
Returns: TypeDocTask
Properties
<Protected>
argNames
● argNames: string
[]
Inherited from BaseExecTask.argNames
Defined in BaseExecTask.ts:10
buildConfig
● buildConfig: IBuildConfig
Inherited from GulpTask.buildConfig
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:20
The global build configuration object. Will be the same for all task instances.
cleanMatch
● cleanMatch: string
[]
Inherited from GulpTask.cleanMatch
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:30
An overridable array of file patterns which will be utilized by the CleanTask to determine which files to delete. Unless overridden, the getCleanMatch() function will return this value.
<Protected>
cmdName
● cmdName: string
Inherited from BaseExecTask.cmdName
Defined in BaseExecTask.ts:9
enabled
● enabled: boolean
Inherited from GulpTask.enabled
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:36
Indicates whether this task should be executed or not. This toggle is used by isEnabled() to determine if the task should run. Since some tasks have more complex logic to determine if they should run or not, the isEnabled() function can be overridden.
name
● name: string
Inherited from GulpTask.name
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:16
The name of the task. The configuration file with this name will be loaded and applied to the task.
<Protected>
optsUseEquals
● optsUseEquals: boolean
Inherited from BaseExecTask.optsUseEquals
Defined in BaseExecTask.ts:11
schema
● schema: Object
| undefined
Inherited from GulpTask.schema
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:55
A JSON Schema object which will be used to validate this task's configuration file.
returns: a z-schema schema definition
taskConfig
● taskConfig: TypeDocConfig
Inherited from GulpTask.taskConfig
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:24
The configuration for this task instance.
Methods
<Protected>
_getConfigFilePath
▸ _getConfigFilePath(): string
Inherited from GulpTask._getConfigFilePath
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:172
Returns the path to the config file used to configure this task
Returns: string
copyFile
▸ copyFile(localSourcePath: string
, localDestPath?: undefined
| string
): void
Inherited from GulpTask.copyFile
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:157
Copy a file from one location to another.
Parameters:
Name | Type | Description | |
---|---|---|---|
localSourcePath | string | path to the source file | |
Optional localDestPath | undefined \ | string | path to the destination file |
Returns: void
execute
▸ execute(config: IBuildConfig
): Promise
<void
>
Inherited from GulpTask.execute
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:139
This function is called once to execute the task. It calls executeTask() and handles the return value from that function. It also provides some utilities such as logging how long each task takes to execute.
Parameters:
Name | Type | Description |
---|---|---|
config | IBuildConfig | the buildConfig which is applied to the task instance before execution |
Returns: Promise
<void
>
a Promise which is completed when the task is finished executing
executeTask
▸ executeTask(): Promise
<void
>
Inherited from BaseExecTask.executeTask
Overrides GulpTask.executeTask
Defined in BaseExecTask.ts:29
Returns: Promise
<void
>
fileError
▸ fileError(filePath: string
, line: number
, column: number
, errorCode: string
, message: string
): void
Inherited from GulpTask.fileError
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:115
Logs an error regarding a specific file to standard error and causes the build to fail.
Parameters:
Name | Type | Description |
---|---|---|
filePath | string | the path to the file which encountered an issue |
line | number | the line in the file which had an issue |
column | number | the column in the file which had an issue |
errorCode | string | the custom error code representing this error |
message | string | a description of the error |
Returns: void
fileExists
▸ fileExists(localPath: string
): boolean
Inherited from GulpTask.fileExists
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:151
Synchronously detect if a file exists.
Parameters:
Name | Type | Description |
---|---|---|
localPath | string | the path to the file [resolved using resolvePath()] |
Returns: boolean
true if the file exists, false otherwise
fileWarning
▸ fileWarning(filePath: string
, line: number
, column: number
, warningCode: string
, message: string
): void
Inherited from GulpTask.fileWarning
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:124
Logs a warning regarding a specific file.
Parameters:
Name | Type | Description |
---|---|---|
filePath | string | the path to the file which encountered an issue |
line | number | the line in the file which had an issue |
column | number | the column in the file which had an issue |
warningCode | string | the custom warning code representing this warning |
message | string | a description of the warning |
Returns: void
getCleanMatch
▸ getCleanMatch(buildConfig: IBuildConfig
, taskConfig?: TTaskConfig
): string
[]
Inherited from GulpTask.getCleanMatch
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:131
An overridable function which returns a list of glob patterns representing files that should be deleted by the CleanTask.
Parameters:
Name | Type | Description |
---|---|---|
buildConfig | IBuildConfig | the current build configuration |
Optional taskConfig | TTaskConfig | a task instance's configuration |
Returns: string
[]
isEnabled
▸ isEnabled(buildConfig: IBuildConfig
): boolean
Inherited from GulpTask.isEnabled
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:50
Overridable function which returns true if this task should be executed, or false if it should be skipped.
Parameters:
Name | Type | Description |
---|---|---|
buildConfig | IBuildConfig | the build configuration which should be used when determining if the task is enabled |
Returns: boolean
true if the build is not redundant and the enabled toggle is true
<Protected>
loadSchema
▸ loadSchema(): Object
| undefined
Inherited from GulpTask.loadSchema
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:168
Override this function to provide a schema which will be used to validate the task's configuration file. This function is called once per task instance.
Returns: Object
| undefined
a z-schema schema definition
log
▸ log(message: string
): void
Inherited from GulpTask.log
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:90
Logs a message to standard output.
Parameters:
Name | Type | Description |
---|---|---|
message | string | the message to log to standard output. |
Returns: void
logError
▸ logError(message: string
): void
Inherited from GulpTask.logError
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:106
Logs an error to standard error and causes the build to fail.
Parameters:
Name | Type | Description |
---|---|---|
message | string | the error description |
Returns: void
logVerbose
▸ logVerbose(message: string
): void
Inherited from GulpTask.logVerbose
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:95
Logs a message to standard output if the verbose flag is specified.
Parameters:
Name | Type | Description |
---|---|---|
message | string | the message to log when in verbose mode |
Returns: void
logWarning
▸ logWarning(message: string
): void
Inherited from GulpTask.logWarning
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:101
Logs a warning. It will be logged to standard error and cause the build to fail if buildConfig.shouldWarningsFailBuild is true, otherwise it will be logged to standard output.
Parameters:
Name | Type | Description |
---|---|---|
message | string | the warning description |
Returns: void
mergeConfig
▸ mergeConfig(taskConfig: Partial
<TypeDocConfig>): void
Inherited from GulpTask.mergeConfig
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:67
Deep merges config settings into task config. Do not use this function if the configuration contains complex objects that cannot be merged.
Parameters:
Name | Type | Description |
---|---|---|
taskConfig | Partial <TypeDocConfig> | configuration settings which should be applied |
Returns: void
onRegister
▸ onRegister(): void
Inherited from GulpTask.onRegister
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:77
This function is called when the task is initially registered into gulp-core-build as a task or subtask. It reads the configuration file, validates it against the schema, then applies it to the task instance's configuration.
Returns: void
readJSONSync
▸ readJSONSync(localPath: string
): Object
| undefined
Inherited from GulpTask.readJSONSync
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:162
Read a JSON file into an object
Parameters:
Name | Type | Description |
---|---|---|
localPath | string | the path to the JSON file |
Returns: Object
| undefined
replaceConfig
▸ replaceConfig(taskConfig: TypeDocConfig): void
Inherited from GulpTask.replaceConfig
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:72
Replaces all of the task config settings with new settings.
Parameters:
Name | Type | Description |
---|---|---|
taskConfig | TypeDocConfig | the new task configuration |
Returns: void
resolvePath
▸ resolvePath(localPath: string
): string
Inherited from GulpTask.resolvePath
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:145
Resolves a path relative to the buildConfig.rootPath.
Parameters:
Name | Type | Description |
---|---|---|
localPath | string | a relative or absolute path |
Returns: string
If localPath is relative, returns an absolute path relative to the rootPath. Otherwise, returns localPath.
setConfig
▸ setConfig(taskConfig: Partial
<TypeDocConfig>): void
Inherited from GulpTask.setConfig
Defined in /home/circleci/cutwater/node_modules/@microsoft/gulp-core-build/lib/tasks/GulpTask.d.ts:61
Shallow merges config settings into the task config. Note this will override configuration options for those which are objects.
Parameters:
Name | Type | Description |
---|---|---|
taskConfig | Partial <TypeDocConfig> | configuration settings which should be applied |
Returns: void