gulp-prefix
A gulp plugin inspired by html-prefixer.
Will prefix relative urls in <link>, <script> and <img> tags
You can optionally pass a second argument along with the prefix string to override the default selection statements. The default config looks like this:
[
{ match: "script[src]", attr: "src" },
{ match: "link[href]", attr: "href"},
{ match: "img[src]", attr: "src"},
{ match: "input[src]", attr: "src"}
]
If you have tags which you do not want to prefix, you can pass a third argument containing a regular expression string which, if matched against the attribute, will ignore the tag.
HTML
Usage
var gulp = prefix = ; gulp;
Output
To run tests install jasmine-node globally npm install jasmine-node -g
and run jasmine-node spec
License
MIT