Prefix URLs in <script>/<link>/<img> with a cdn URL
var prefixer = require("html-prefixer");
prefixr(stream, { prefix : "//abcdefg123.cloudfront.net" }, function(err, text) {
if(err) {
throw new Error(err);
}
console.log(text.toString("utf8"));
});
stream
{Stream} Readable stream to parseoptions
{Object}cb
{Function}err
{Error | null}text
{Buffer} Rewritten text
prefix
{String} URL used to prefix elements.
This project's version number currently has a "0.x" prefix, indicating that it's a new project under heavy development. As long as the version number starts with "0.x", minor revisions may introduce breaking changes. You've been warned!
Once it reaches version 1.0.0, it will adhere strictly to SemVer 2.0.