Closed ozten closed 12 years ago
+1.
var html = "";
cachify('/js/main.min.js').forEach(function(file) {
html += util.format('<script src="%s" defer></script>\n', file);
});
return html;
Fixed in https://github.com/mozilla/connect-cachify/commit/fe8df0c486071d304def714bf61a3a79f3ed0dc3
Made a slight tweak to syntax, example at the bottom of https://github.com/mozilla/connect-cachify/blob/master/docs/API.md
A new function
cachify
would output an array of strings with no HTML tag. This way user's could iterate the output and write their own HTML script or link tags.We should add an optional argument to cachify_js and cahify_css to control the formatting of tags.