easy-tinypng-cli
Version:
A cli can be used to compress images with tinypng.com
18 lines (17 loc) • 1.3 kB
TypeScript
import type { Config, ExportConfig } from './types';
declare function defineTinyConfig(config: ExportConfig): ExportConfig;
export { defineTinyConfig, };
export declare function getAllConfigs(config: ExportConfig): Config[];
export declare function startOptimize(configs: Config[], APIKey: string): Promise<void>;
export declare function isPathDirectory(path: string): boolean;
export declare function isFileExist(pathDir: string): Promise<unknown>;
export declare function isRecord(watchFileDir: string, pathDir: string): Promise<boolean>;
export declare function record(watchFileDir: string, pathDir: string): Promise<void>;
export declare function removeRecord(watchFileDir: string, pathDir: string): Promise<void>;
export declare function getFileName(pathDir: string): string;
export declare function getExtName(pathDir: string): string;
export declare function autoRecord(watchFileDir: string, action: 'add' | 'unlink' | 'change', pathDir: string): Promise<void>;
export declare function isImageFile(pathDir: string): boolean;
export declare function reduceImage(watchFileDir: string, fileDir: string, targetDir: string): Promise<void>;
export declare function ConsoleFigFont(str: string): Promise<unknown>;
export declare function getTargetFileImagesCount(targetDir: string): Promise<number>;