blog/lib/tasks/images.ts

12 lines
324 B
TypeScript

import hashPaths from "../hash.ts";
import { dest, fromGlob } from "../rx-utils.ts";
import { tap } from "rxjs";
export const images = () =>
fromGlob("src/*.avif")
.pipe(
tap((f) => (f.path = f.basename!)),
hashPaths("images.manifest"),
)
.forEach(dest("dist/_assets"));