Closed thescientist13 closed 4 years ago
Thanks for taking a look at this. As you can probably guess, I haven't really been maintaining this repo for a while now.
I think this is an interesting idea, but I have a couple requests:
Thanks for taking a look and happy to make the suggested changes.
but it's already something that can be fixed with tighter Regexes
fair point, but happy that this can be considered a feature of the tool 😄
regarding this part
It should be optional, and not enabled by default
To implement that, would you like it so the user just passes something like
processInput({
files: ['**/*.js', '**/*.png', '**/*.css'],
defaultCDNBase: '//examplecdn/',
preserveAbsolute: true
}, 'index-exclusions.html', 'index-exclusions.html');
and then the tool would only enable that check if the flag is in place?
var cdnTemplate = preserveAbsolute && excludeCdnPrefix
? '<%= filepath %>'
: fileInfo.cdn || opts.defaultCDN;
I can update the README as well if the above behavior documented.
Yeah, exactly! And if you would update the README, that would be great, too. Thanks a bunch!
@OverZealous Done! I'll squash once everything looks good to you. 👍
@OverZealous Squashed 🔨
Published as v3.1.0
resolves #21 by adding exceptions for paths that wouldn't need cdnizing, like:
//cdn.com/lib/index.js
http[s]://cdn.com/lib/index.js