blog/lib/tasks/svg.ts

9 lines
306 B
TypeScript

import { tap } from "rxjs";
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.
export const svg = () =>
fromGlob("src/*.svg")
.pipe(tap((f) => (f.path = f.basename!)))
.forEach(dest("dist"));