import type * as Gulp from 'gulp'; import * as yargs from 'yargs'; import * as coreBuild from '@microsoft/gulp-core-build'; export declare const preCopy: coreBuild.CopyTask; export declare const postCopy: coreBuild.CopyTask; /** * The flags which this build rig defines. Extend this for child rigs */ export interface ISPBuildRigArgs { production: boolean; ship: boolean; tasks: boolean; verbose: boolean; writeNUnitResults: boolean; /** * All SPFx build rigs can be tested in a specific locale using this flag, * which is defined in the localization code */ locale: string; /** * When this flag is enabled, certain expensive build steps will be disabled. * This should allow the developer to quickly refresh their repository after * pulling from master, or in the inner loop (when doing serve) */ lite: boolean; } /** * Represents the a task which is registered to the gulp command line * The arguments function is evaluated if this is the current task, it should * interact with yargs to define any custom values. */ export interface ITaskDefinition { executable: coreBuild.IExecutable; arguments?: (args: yargs.Argv) => void; } /** * This class represents the basic shared build rig for all SPFx Rigs. It defines a few * simple sub-tasks, and only registers a "build" task. */ export declare class SPBuildRig { protected _preBuildTasks: coreBuild.IExecutable[]; protected _postTypescriptTasks: coreBuild.IExecutable[]; protected _postBuildTasks: coreBuild.IExecutable[]; protected _postTelemetryTask: coreBuild.IExecutable[]; protected _preTelemetryTask: coreBuild.IExecutable[]; protected args: ISPBuildRigArgs; protected nodeSupportedVersionRange: string; initialize(gulp: typeof Gulp): void; /** * Register additional telemetry sub-tasks to run at the end of the sequence */ addPostTelemetryTask(tasks: coreBuild.IExecutable | coreBuild.IExecutable[]): void; /** * Register additional telemetry sub-tasks to run at the beginning of the sequence */ addPreTelemetryTask(tasks: coreBuild.IExecutable | coreBuild.IExecutable[]): void; /** * Register additional sub-tasks to run before the typescript subtask. * Note, this is meant to be used in a gulpfile.js to inject one-off subtasks */ addPreBuildTask(tasks: coreBuild.IExecutable | coreBuild.IExecutable[]): void; /** * Register additional sub-tasks to run after the typescript subtask. * Note, this is meant to be used in a gulpfile.js to inject one-off subtasks */ addPostTypescriptTask(tasks: coreBuild.IExecutable | coreBuild.IExecutable[]): void; /** * Register additional sub-tasks to run after the typescript subtask. * @deprecated - Use {@link addPostTypescriptTask} instead */ addBuildTasks(tasks: coreBuild.IExecutable | coreBuild.IExecutable[]): void; /** * Register additional sub-tasks to run after the entire build. * Note, this is meant to be used in a gulpfile.js to inject one-off subtasks */ addPostBuildTask(tasks: coreBuild.IExecutable | coreBuild.IExecutable[]): void; /** * Override this function to register more top-level command line arguments (i.e. not task-specific). * Ideally, extend the ICoreBuildArgs when hooking into this function * * Registers the command line arguments which are available for this rig */ protected getYargs(): yargs.Argv; /** * Override this function to create new top-level tasks which can be executed via the command line * * Register 2 tasks, build and default, which simply copy files, then run typescript and tslint */ protected getTasks(): Map; /** * Override this function to overwrite the "build" task */ protected getBuildTask(): coreBuild.IExecutable; /** * Override this function to redefine the core build loop */ protected getCoreBuildTask(): coreBuild.IExecutable; /** * Override this function to do configuration before the configuration .json files have been loaded */ protected setupSharedConfig(): void; /** * Override this function to do configuration after the configuration .json files have been loaded * * This function cleans up the shared config by populating task config properties that depend on other tasks' * user-defined properties. */ protected finalizeSharedConfig(): void; protected addTaskOrListOfTasks(tasks: coreBuild.IExecutable | coreBuild.IExecutable[], array: coreBuild.IExecutable[]): void; protected _disableTasks(...tasks: coreBuild.IExecutable[]): void; } //# sourceMappingURL=SPBuildRig.d.ts.map