blog/lib/tasks/svg.ts

9 lines
306 B
TypeScript
Raw Normal View History

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