@altano/html-cdnify
Version:
Transform the relative URLs in your HTML markup (e.g. scripts, stylesheets, images) to use your CDN URL.
26 lines (24 loc) • 592 B
JavaScript
import trumpet from "@gofunky/trumpet";
import streamToPromise from "stream-to-promise";
//#region src/HtmlTransformer.ts
var HtmlTransformer = class {
transformStream;
constructor() {
this.transformStream = trumpet();
}
/**
* Get the underlying transform stream
*/
get stream() {
return this.transformStream;
}
/**
* Get a promise to the complete output Buffer (alternative API to dealing with stream)
*/
get outputBufferPromise() {
return streamToPromise(this.stream);
}
};
//#endregion
export { HtmlTransformer as default };
//# sourceMappingURL=HtmlTransformer.js.map