blog/lib/tasks/svg.ts

9 lines
314 B
TypeScript
Raw Normal View History

2024-06-27 01:36:05 +00:00
import { tap } from "rxjs";
import { dest, fromGlob } from "../rx-utils.js";
// 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")
.pipe(tap((f) => (f.path = f.path.substring(4))))
2024-06-27 01:28:17 +00:00
.forEach(dest("dist"));