@marp-team/marp-cli
Version:
A CLI interface for Marp and Marpit based converters
45 lines (44 loc) • 1.52 kB
TypeScript
import { Options as GlobbyOptions } from 'globby';
export declare const markdownExtensions: string[];
interface GenerateTmpFileInterfaceOptions {
extension?: `.${string}`;
}
export declare const generateTmpFileInterface: ({ extension, }?: GenerateTmpFileInterfaceOptions) => Promise<File.TmpFileInterface>;
export interface FileConvertOption {
extension?: string;
page?: number;
}
export declare enum FileType {
File = 0,
StandardIO = 1,
Null = 2
}
export declare class File {
buffer?: Buffer;
inputDir?: string;
type: FileType;
readonly path: string;
constructor(filepath: string);
get absolutePath(): string;
get absoluteFileScheme(): string;
convert(output: string | false | undefined, opts: FileConvertOption): File;
load(): Promise<Buffer<ArrayBufferLike>>;
relativePath(from?: string): string;
save(): Promise<void>;
saveTmpFile({ extension, }?: GenerateTmpFileInterfaceOptions): Promise<File.TmpFileInterface>;
private convertName;
private saveToFile;
private static stdinBuffer?;
static findPath(opts: GlobbyOptions, ...paths: string[]): Promise<string[]>;
static find(...paths: string[]): Promise<File[]>;
static findDir(directory: string): Promise<File[]>;
static stdin(): Promise<File | undefined>;
private static initialize;
}
export declare namespace File {
interface TmpFileInterface extends AsyncDisposable, Disposable {
path: string;
cleanup: () => Promise<void>;
}
}
export {};