UNPKG

4.12 kBTypeScriptView Raw
1/// <reference types="node" />
2import { GulpProxy } from './GulpProxy';
3import { IExecutable } from './IExecutable';
4import { IBuildConfig } from './IBuildConfig';
5import { CopyStaticAssetsTask } from './tasks/copyStaticAssets/CopyStaticAssetsTask';
6export { IExecutable } from './IExecutable';
7import * as Gulp from 'gulp';
8import { JestTask } from './tasks/JestTask';
9export * from './IBuildConfig';
10export { addSuppression, coverageData, functionalTestRun, getErrors, getWarnings, TestResultState, warn, verbose, error, fileError, fileLog, fileWarning, reset, log, logSummary } from './logging';
11export { GCBTerminalProvider } from './utilities/GCBTerminalProvider';
12export * from './tasks/CopyTask';
13export * from './tasks/GenerateShrinkwrapTask';
14export * from './tasks/GulpTask';
15export * from './tasks/CleanTask';
16export * from './tasks/CleanFlagTask';
17export * from './tasks/ValidateShrinkwrapTask';
18export * from './tasks/copyStaticAssets/CopyStaticAssetsTask';
19export * from './tasks/JestTask';
20/**
21 * Merges the given build config settings into existing settings.
22 *
23 * @param config - The build config settings.
24 * @public
25 */
26export declare function setConfig(config: Partial<IBuildConfig>): void;
27/**
28 * Merges the given build config settings into existing settings.
29 *
30 * @param config - The build config settings.
31 * @public
32 */
33export declare function mergeConfig(config: Partial<IBuildConfig>): void;
34/**
35 * Replaces the build config.
36 *
37 * @param config - The build config settings.
38 * @public
39 */
40export declare function replaceConfig(config: IBuildConfig): void;
41/**
42 * Gets the current config.
43 * @returns the current build configuration
44 * @public
45 */
46export declare function getConfig(): IBuildConfig;
47/** @public */
48export declare const cleanFlag: IExecutable;
49/**
50 * Registers an IExecutable to gulp so that it can be called from the command line
51 * @param taskName - the name of the task, can be called from the command line (e.g. "gulp <taskName>")
52 * @param taskExecutable - the executable to execute when the task is invoked
53 * @returns the task parameter
54 * @public
55 */
56export declare function task(taskName: string, taskExecutable: IExecutable): IExecutable;
57/**
58 * The callback interface for a custom task definition.
59 * The task should either return a Promise, a stream, or call the
60 * callback function (passing in an object value if there was an error).
61 * @public
62 */
63export interface ICustomGulpTask {
64 (gulp: typeof Gulp | GulpProxy, buildConfig: IBuildConfig, done?: (failure?: any) => void): Promise<object> | NodeJS.ReadWriteStream | void;
65}
66/**
67 * Creates a new subtask from a function callback. Useful as a shorthand way
68 * of defining tasks directly in a gulpfile.
69 *
70 * @param taskName - the name of the task, appearing in build logs
71 * @param fn - the callback function to execute when this task runs
72 * @returns an IExecutable which can be registered to the command line with task()
73 * @public
74 */
75export declare function subTask(taskName: string, fn: ICustomGulpTask): IExecutable;
76/**
77 * Defines a gulp watch and maps it to a given IExecutable.
78 *
79 * @param watchMatch - the list of files patterns to watch
80 * @param taskExecutable - the task to execute when a file changes
81 * @returns IExecutable
82 * @public
83 */
84export declare function watch(watchMatch: string | string[], taskExecutable: IExecutable): IExecutable;
85/**
86 * Takes in IExecutables as arguments and returns an IExecutable that will execute them in serial.
87 * @public
88 */
89export declare function serial(...tasks: (IExecutable[] | IExecutable)[]): IExecutable;
90/**
91 * Takes in IExecutables as arguments and returns an IExecutable that will execute them in parallel.
92 * @public
93 */
94export declare function parallel(...tasks: (IExecutable[] | IExecutable)[]): IExecutable;
95/**
96 * Initializes the gulp tasks.
97 * @public
98 */
99export declare function initialize(gulp: typeof Gulp): void;
100/** @public */
101export declare const clean: IExecutable;
102/** @public */
103export declare const copyStaticAssets: CopyStaticAssetsTask;
104/** @public */
105export declare const jest: JestTask;
106//# sourceMappingURL=index.d.ts.map
\No newline at end of file