Skip to content
This repository was archived by the owner on Feb 15, 2018. It is now read-only.
/ node-html-prefixer Public archive

Prefix /urls/like/this in your html with a CDN URL

Notifications You must be signed in to change notification settings

tivac/node-html-prefixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html-prefixer

Build Status NPM version Dependency Status Bitdeli Badge

Prefix URLs in <script>/<link>/<img> with a cdn URL

⚠️⚠️ This project is UNMAINTAINED ⚠️⚠️

Usage

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"));
});

API

prefixer(stream, [options], cb)

  • stream {Stream} Readable stream to parse
  • options {Object}
  • cb {Function}
    • err {Error | null}
    • text {Buffer} Rewritten text

Options

  • prefix {String} URL used to prefix elements.

A Note on Versioning

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.

About

Prefix /urls/like/this in your html with a CDN URL

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •