Combine
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Serves Combined & compressed js & css with caching, using ColdFusion
License
-------

   Copyright 2009 Joe Roberts

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


Combine.CFC
-----------

Combine multiple javascript or CSS files into a single, compressed, HTTP request.

Allows you to change this:

	
	
	
	
To this:

	

...combining and compressing multiple javascript or css files into one http request.


How do I use it?
----------------
- Place combine.cfm and Combine.cfc somewhere under your webserver
- Modify the combine.cfm with your preferred combine options, and error handling if required.
- Update your 
  - 
- If you want to use the CSS or Javascript compression, you need to add the required Java to your classpath. See "How to add the Java to your classpath" below...


Caching
-------
Combine caches the generated 


How much?
---------
Nowt! If you find this project worthy of a donation, please visit my Amazon wishlist http://www.amazon.co.uk/gp/registry/3JVC6BNDZP81B


Using JavaLoader to load the Java objects
-----------------------------------------
By using Mark Mandel's JavaLoader, you can avoid having to place the .jar files in the class path, which can be fiddly, or even restricted on some shared hosting platforms.
1. Download JavaLoader http://javaloader.riaforge.org/
2. Tweak combine.cfm to pass in an instance of JavaLoader.cfc, and the path to the directory where you have placed the .jar files included with Combine.


How to add the Java to your classpath [required for css and js compression, unless you use JavaLoader]
------------------------------------------------------------------------------------------------------
1. Determine where you will place your Java, it must go in a directory in your Coldfusion class path. This could either be cf_install_dir\lib, or a custom directory path which has been added to the Coldfusion class path (through Coldfusion's admin/config)
2. Add the code to the class_path_dir as determined in step 1. Copy combine.jar and yuicompressor.x.x.x.jar to your class_path_dir.
3. Restart your CFML server


Why?
----
- Reduces the number of HTTP requests required to load your page. All your javascript files can be combined into a single 



				
			
		
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。