-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix cdnify #1242
base: master
Are you sure you want to change the base?
Fix cdnify #1242
Conversation
It looks like jQuery Mobile and jQuery UI both have css files that can be served via the Google CDN (although I haven't checked the grunt task itself). For completeness, it still seems this pull request should include something to the effect of:
|
@wthomsen Google CDN does also serve CSS files, that is true. However |
@eddiemonge I would appreciate some feedback on this PR. Even if it is just "We don't want this.". |
This PR should be merged. If not, CDN support should be removed, because it is useless in its current state. @raphinesse is right about CSS not being picked up by |
First, thanks for the work on this. Sorry I've been a bit absentee on this project. Other things have taken priority. I'm trying to get back to it though
|
Previously, the script references in index.html that were changed by the cdnify step would later be overwritten by the usemin task. Now, cdnify runs before useminPrepare and the usemin task is configured to include references for cdnified scripts right before the actual block replacements.
…rsions Previously, grunt-google-cdn resolved the angular version requirement of "^1.4.0" to some 1.5 pre-release. Unfortunately there is no release of grunt-google-cdn that includes the relevant fix. So we now require a specific commit instead of a released version.
@eddiemonge Thanks for taking the time.
Done.
I don't quite get this. Would you suggest that files should first be copied from
So HTML files are just copied to
I did not squash these two on purpose, since they tackle two different issues that both prevented cdnify to work correctly. Each commit message includes an explanation of what went wrong and how it was fixed. If you still have me rather squash them, I will, of course. |
This should resolve #955. Feedback welcome.
At the moment of writing, this PR reduces the
vendor.js
size of a freshly scaffolded project with default options from 315 kB to 119 kB.Contrary to the contribution guidelines, there are no tests included with this PR. That is because I could not find any tests regarding (parts of) the generated build process in the current version of
generator-angular
. So if I were to add tests for this fix I would need directions.@wthomsen suggested that a fix should also handle cdnified CSS. However, in the current configuration (using
google-cdn-data
) only JS files are available for inclusion from CDN anyway. From my brief look at the code ofgoogle-cdn
, I doubt that It actually supports cdnification of CSS files. Consequently this fix only deals with cdnification of JS files.Since the whole
google-cdn
ecosystem seems painfully outdated/unmaintained (especially important with the*-cdn-data
packages), I thought I might write a replacement using jsdelivr/api, so that the data wouldn't have to be manually synchronized with the respective CDNs. Any thoughts on that would be welcome, too.