img-src-placeholder
Version:
Replace src=# in <img> tags with a data URL of a transparent 1 pixel image (CLI for package.json scripts)
20 lines (18 loc) • 648 B
TypeScript
//! img-src-placeholder v1.2.3 ~~ https://github.com/center-key/img-src-placeholder ~~ MIT License
import { Results } from 'replacer-util';
export type Settings = {
cd: string | null;
extensions: string[];
filename: string | null;
};
export type ReporterSettings = {
summaryOnly: boolean;
};
declare const imgSrcPlaceholder: {
htmlExts: string[];
assert(ok: unknown, message: string | null): void;
cli(): void;
transform(sourceFolder: string, targetFolder: string, options?: Partial<Settings>): Results;
reporter(results: Results, options?: Partial<ReporterSettings>): Results;
};
export { imgSrcPlaceholder };