2024-06-27 08:58:54 +00:00
|
|
|
import { mergeMap } from "rxjs";
|
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-27 08:58:54 +00:00
|
|
|
import { lastValueFrom } from "rxjs";
|
2024-06-21 19:17:32 +00:00
|
|
|
|
2024-06-27 08:58:54 +00:00
|
|
|
export const images = async () => {
|
|
|
|
await lastValueFrom(
|
|
|
|
fromGlob("src/*.avif")
|
|
|
|
.pipe(
|
|
|
|
tap((f) => (f.path = f.basename!)),
|
|
|
|
hashPaths("images.manifest"),
|
|
|
|
mergeMap(dest("dist/_assets")),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
};
|