blog/lib/tasks/images.ts

12 lines
324 B
TypeScript
Raw Normal View History

2024-06-27 04:22:58 +00:00
import hashPaths from "../hash.ts";
import { dest, fromGlob } from "../rx-utils.ts";
import { tap } from "rxjs";
2024-06-21 21:03:37 +00:00
export const images = () =>
2024-06-27 01:36:05 +00:00
fromGlob("src/*.avif")
2024-06-27 01:28:17 +00:00
.pipe(
2024-06-27 08:06:39 +00:00
tap((f) => (f.path = f.basename!)),
2024-06-27 01:28:17 +00:00
hashPaths("images.manifest"),
)
.forEach(dest("dist/_assets"));