UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

27 lines 909 B
import { SimpleProjectEditor } from "@atomist/automation-client/lib/operations/edit/projectEditor"; export interface AppendOrCreateCommand { /** * Path of file to create or append to */ path: string; /** * Content to append. Should include any whitespace * required before it */ toAppend: string; /** * Custom test as to whether we should create * @param {string} content * @return {boolean} */ leaveAlone?: (oldContent: string) => boolean; } /** * Return an editor to append the given content to the end of the file at the specified path, * creating the file with only this content if it doesn't exist. * Adds no whitespace. * @param command command * @return {SimpleProjectEditor} */ export declare function appendOrCreateFileContent(command: AppendOrCreateCommand): SimpleProjectEditor; //# sourceMappingURL=appendOrCreate.d.ts.map