kenn / jquery-rails-cdn Goto Github PK
View Code? Open in Web Editor NEWAdd CDN support to jquery-rails
License: MIT License
Add CDN support to jquery-rails
License: MIT License
Why gem serves uncompressed version of jQuery when using Yandex as CDN? There is also minified version available - http://yandex.st/jquery/1.8.0/jquery.min.js
Since jquery asset is the fall-back solution when cdn is not available, it should be mentioned that jquery.js still need to be precompiled in production . In this case, it should be added into config.assets.precompile of config/environments/production.
Hi, awesome gem! What are your thoughts on including support for jquery-ui?
jQuery team release 1.8.0 version, but in jquery-rails
is still 1.7.2. They are too slow. I can put new version in vendor/assets/javascripts/
, but jquery-rails-cdn
rake jQuery version only from jquery-rails
.
So, maybe we need to add option, like:
= jquery_include_tag :google, version: '1.8.0'
If you agree, I can create pull request.
really nice work, but, what about the jQuery-UI ? did you target it too in your gem ?
any way to specify the version of jquery we want to use?
https://developers.google.com/speed/libraries/devguide#jquery
I'm not sure if this is a problem on my end (or something to do with jquery-rails), but in my app, the code jquery-rails-cdn generates seems to be off by a version. For the ajax.googleapis.com URL it says 1.8.3, but for local precompiled version (jquery.js) its the correct version (1.9.0)
Thanks!
Hi
I saw that you update 'jquery-rails-cdn' to new version '1.1.2', but https://rubygems.org/gems/jquery-rails-cdn states last version to be 1.1.1. Can you please publish to rubygems.org?
Thank you
Has any work been planned to allow the use of [email protected]?
Also see this thread on reddit.
Hello, (first issue I do- be gentle)
In version 1.1.0 you added the use of constant Jquery::Rails::JQUERY_2_VERSION in lib/jquery-rails-cdn.rb
But I believe it's only added by rails4 in the jquery-rails gem- http://www.rubydoc.info/gems/jquery-rails/4.0.5/Jquery/Rails
I use jquery-rails-3.1.4 (I still use rails 3), which doesn't have that constant defined- and since jquery-rails-4.0.5 (or higher) isn't a dependency of jquery-rails-cdn- It just doesn't have it- and eventually the production environment fail bcz this constant isn't defined.
My solution was to use jquery-rails-cdn version 1.0.3 where the Jquery::Rails::JQUERY_2_VERSION isn't used there. (it was added in jquery-rails-cdn version 1.1.0)
Hope I made myself clear.
Have a nice day.
Hello Kenn.
I saw that you update 'jquery-rails-cdn' to new version '1.1.0', but I cann't download this from https://rubygems.org/gems/jquery-rails-cdn. Did you forget publish to rubygems.org??
Thank you
The local version of jQuery is currently hardcoded to v1 due to using :jquery as symbol. Setting Jquery::Rails::Cdn.major_version = 2
doesn't change the behaviour and leads to between the version loaded from CDN in production mode and the jQuery version used during development, test or while being offline.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.