gulp-core-build-typescript containsgulp-core-build` subtasks for compiling and linting TypeScript code.
ITypeScriptTaskConfig interface for the definition.
Fails the build when errors occur.
An array of glob matches for files to be included in the build.
Array of glob matches for files that should by passed through (copied) to the build output.
Custom TypeScript reporter.
Should be an interface conforming to:
Default: a custom function which writes errors to the console.
Optional override of the typescript compiler. Set this to the result of require('typescript').
Removes comments from all generated
.js files. Will not remove comments from generated
If true, creates sourcemap files which are useful for debugging.
The task for linting the TypeScript code.
By default, it includes a cache, such that files which have not been updated since the last linting are not checked again, unless the config or tslint version has changed.
ITSLintTaskConfig interface for the definition.
The tslint configuration object.
Directories to search for custom linter rules. An array of glob expressions.
Default: the tslint-microsoft-contrib directory
Provides the glob matches for files to be analyzed.
A function which reports errors to the proper location. It should conform to the following interface:
((result: lintTypes.LintResult, file: gutil.File, options: ITSLintTaskConfig) => void;)
Defaults to using the base GulpTask's this.fileError() function.
If true, displays warnings as errors. If the reporter function is overwritten, it should reference this flag.
If true, the lintConfig rules which were previously set will be removed. This flag is useful for ensuring that there are no rules activated from previous calls to setConfig().
If false, does not use a default tslint configuration as the basis for creating the list of active rules.
/// <reference path='...' /> entries from compiled D.TS files.
This helps mitigate an issue with duplicated typings in TS 1.8.
This task has no configuration options.
ITextTaskConfig interface for the definition.
Glob matches for files that should be converted into modules.
To use these tasks in your build setup, simply import the package and add the task to a build task group.
Some examples of build packages that use this task:
Use the standard "setConfig" method on task instances to set their configuration options. Example:
@microsoft/gulp-core-build - An abstraction around gulp that adds simplified serial/parallel task execution and a formal base task interface.
typescript - The TypeScript compiler.