README.rdoc in ajaxlibs-0.1.0 vs README.rdoc in ajaxlibs-0.1.1
- old
+ new
@@ -1,7 +1,16 @@
= Ajaxlibs
+== Synopsis
+
+Simplify standard javascript library includes :
+* specify your library name and if necessary version number
+* provides most common javascript libraries, no need to download them
+* easy CDN for javascript libraries : relies on Google CDN to distribute javascript files on production environment
+
+All that using a simple helper ruby method.
+
== Description
Ajaxlibs provides helpers to load various javascript libraries, specifying version number, locally served or using google CDN.
In development environment, it provides local javascript files for the development server. In production environment, it will automatically use google CDN to serve your standard javascript libraries.
@@ -18,34 +27,24 @@
<script src="/javascripts/ajaxlibs/jquery/1.4.2/jquery.js?1267013480" type="text/javascript"></script>
and in production :
- <script type="text/javascript" src="http://www.google.com/jsapi"></script>
- <script type="text/javascript">
- //<![CDATA[
- google.load('jquery', '1.4.2');
- //]]>
- </script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript"></script>
=== multiple libraries load
<%= ajaxlibs_include :jquery, :jqueryui %>
in development environment :
<script src="/javascripts/ajaxlibs/jquery/1.4.2/jquery.js?1267013480" type="text/javascript"></script>
- <script src="/javascripts/ajaxlibs/jqueryui/1.7.2/jqueryui.js" type="text/javascript"></script>
+ <script src="/javascripts/ajaxlibs/jqueryui/1.7.2/jqueryui.js?1267013480" type="text/javascript"></script>
this time in production :
- <script type="text/javascript" src="http://www.google.com/jsapi"></script>
- <script type="text/javascript">
- //<![CDATA[
- google.load('jquery', '1.4.2');
- google.load('jqueryui', '1.7.2');
- //]]>
- </script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js" type="text/javascript"></script>
=== forcing a version
<%= ajaxlibs_include :prototype, :version => '1.6.0.3' %>