UNPKG

909 BTypeScriptView Raw
1import { SimpleProjectEditor } from "@atomist/automation-client/lib/operations/edit/projectEditor";
2export interface AppendOrCreateCommand {
3 /**
4 * Path of file to create or append to
5 */
6 path: string;
7 /**
8 * Content to append. Should include any whitespace
9 * required before it
10 */
11 toAppend: string;
12 /**
13 * Custom test as to whether we should create
14 * @param {string} content
15 * @return {boolean}
16 */
17 leaveAlone?: (oldContent: string) => boolean;
18}
19/**
20 * Return an editor to append the given content to the end of the file at the specified path,
21 * creating the file with only this content if it doesn't exist.
22 * Adds no whitespace.
23 * @param command command
24 * @return {SimpleProjectEditor}
25 */
26export declare function appendOrCreateFileContent(command: AppendOrCreateCommand): SimpleProjectEditor;
27//# sourceMappingURL=appendOrCreate.d.ts.map
\No newline at end of file