-
Notifications
You must be signed in to change notification settings - Fork 1.4k
'grunt cdnify' doesn't do anything #266
Comments
Could you give more information, please? Have a look at the issue guidelines. |
sorry, updated the issue.. |
Thanks for the update, I can confirm this. It doesn't happen with the master version of @btford Could you publish a new release of |
any updates on this issue ? |
pushed sorry for the hold up. |
Thanks! |
Is this working right now? I just updated to v0.2.2 but the same result after run <!-- Other content -->
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<!-- Other content --> cdnify: {
dist: {
html: ['<%= yeoman.dist %>/*.html']
}
} Log:
Thanks in advance. |
@passy this still doesn't appear to work with [email protected] |
@diestrin, @patrickrs, It doesn't work for me either. I did some investigation, and it seems google-cdn has hard-coded lists of supported versions of packages. Since I am using AngularJS 1.2, which is not on the list, I assume this is why it does not work for me. Rather than try to keep google-cdn updated with every package release, I decided to just use grunt-htmlrefs to manually specify script tag replacements. Here's how I did it. |
Any news on this? It doesn't replace anything for me either. |
it replaces jQuery only. Angular and other bower components are the same |
@X1011 Thank you! |
I've been struggling with this issue.. I've come to the following conclusions:
which on nodejs v0.10.21 at least raises a There also may be an ordering issue in the default build task, cdnify needs to run before all the bower scripts get concatenated. I'm not really sure what the fix should be here. It seems grunt-google-cdn is what needs to be updated, but maybe yeoman could work around it somehow. Edit: installing grunt-google-cdn from git://github.com/syamanaka/grunt-google-cdn#develop which has the bumped dependencies made things work mostly better. Only problem is that the intermediate file looks like:
... instead of moving the script tags outside the build:js like the older version tried to do. |
@JustinAzoff I'm having the same issue. The cdnified scripts are just getting minified since they aren't moved outside the usemin block. Did you come up with a workaround? |
@leptronic yeah, I got things mostly working. First I had to install the git version of grunt-google-cdn. so my package.json has:
Then I had to move the cdn capable scripts outside of the bower:js block. This kind of breaks bower, but it's the only thing that worked: So I have:
|
Thanks @JustinAzoff . I can't move my cdn scripts though. I need builds that can be cdnified or minified. Maybe I can just create a grunt task that removes the build block comment when I need a cdnified build. It would be nice if usemin could be configured to ignore a build block. |
Ah. The proper fix is probably to make cdnify play nice with bower and usemin again. It used to (or at least used to try to) do what I did automatically during the build |
agreed with JustinAzoff. This should not be closed. cdnify should work with usemin. cdnify the vendor scripts found and usemin the rest. |
Hi, I was able to cdnify jquery on this repo generated with generator-webapp: https://github.com/davidemoro/p_started/tree/master/p_started/webapp The .html file contains templating language syntax statements because the webapp folder is integrated with a python-based framework, but it should work with plain html as well. Just remove things like tal:comment, tal:attributes, tal:define, etc. Hope it might help. |
Why was this issue closed? It appears that it's still an issue. I had to move my cdn scripts out as JustinAzoff did. |
+1 |
I'm having this issue too |
+1 edit: the issue appears to be due to the fact that this source file hasn't been updated in 2 yrs |
someone made a grunt task to hack around this: https://github.com/mjetek/grunt-cdn-nobuild i suspect this is closed because it is a 'not me' issue. it is very annoying though. |
see also btford/grunt-google-cdn#47 |
and the open issue (with workaround #955 (comment)) |
So there is no solution and this is closed as well. 👎 |
It was getting same issue on ubuntu 14 server. It was getting stuck for me. I just stopped the server and tried again and it works ✨ ✨ ✨ |
@oyeharry ah that makes sense. So when im running |
Any development on this so far? |
2016, still issues.. :( |
2017 still issues with cdnify yo angular |
'grunt build' results are the local files rather than Google CDN,
this build process does output:
Running "cdnify:dist" (cdnify) task
Going through dist/404.html, dist/index.html to update script refs
but still all scripts point to bower_components/
index.html:
The text was updated successfully, but these errors were encountered: