A command to update a text file content / create file
Type: object literal
Type: string
Type: boolean
Default: false
Whether to create the file in case it does not exist on disk.
Type: string
Type: string
Default: append
Possible values: replace | prepend | append
const { Commands } = require("@abstracter/atomic-release");
const createFileCommand = new Commands.FileWriterCommand({
create: true,
content: "This is SPARTA",
absoluteFilePath: "/home/dev/project/new-file.txt",
});
const prependContentCommnd = new Commands.FileWriterCommand({
content: "42",
mode: "prepend",
absoluteFilePath: "/home/dev/project/existing.txt",
});