2024-06-27 08:58:54 +00:00
|
|
|
import { lastValueFrom, tap } from "rxjs";
|
2024-06-27 04:22:58 +00:00
|
|
|
import { dest, fromGlob } from "../rx-utils.ts";
|
2024-06-27 08:58:54 +00:00
|
|
|
import { mergeMap } from "rxjs";
|
2024-06-21 19:17:32 +00:00
|
|
|
|
|
|
|
// SVG `use` has no way of allowing cross-origin, so we need to keep them with the HTML files.
|
2024-06-27 08:58:54 +00:00
|
|
|
export const svg = async () => {
|
|
|
|
await lastValueFrom(
|
|
|
|
fromGlob("src/*.svg")
|
|
|
|
.pipe(tap((f) => (f.path = f.basename!)), mergeMap(dest("dist"))),
|
|
|
|
);
|
|
|
|
};
|