passy / google-cdn

Replaces references to resources on the Google CDN
BSD 3-Clause "New" or "Revised" License
70 stars 34 forks source link

Hoisting removed ? #48

Open recrsn opened 8 years ago

recrsn commented 8 years ago

Came back to JavaScript development after a while. Noticed that change 90a7e6d defeats the purpose of CDNify in some yeoman generated projects. Yeoman's gruntfile uses google-cdn to before usemin to change references to commonly used libraries (such as Angular in my case). After replacements, the entire scripts block is replaced, along with the references changed by google-cdn. As a result all references to libraries is lost.

Can the support for hoisting be retrofitted ?

david-mohr commented 8 years ago

I put together a gulp package to help with this: https://github.com/david-mohr/gulp-cdn-hoist (based on the grunt package https://github.com/mjetek/grunt-cdn-nobuild)