Creating a Fluid Infusion Custom Build
If you want to use the whole of Fluid Infusion, use InfusionAll.js which can be downloaded from Downloads. However, you may wish to create a customized version of Infusion, which includes or excludes various elements.
In the future, the downloads page on the website will allow you to create your own custom build. This feature is currently not available, but you can still create custom builds of Fluid Infusion if you know a bit about ant and svn.
What you will need to do a custom build
- Apache Ant
- The optional Ant task 'Script'
- Apache Maven
- Fluid Infusion source and build scripts
Getting and configuring Ant
- Download the latest full version of Ant from ant.apache.org
- Put it wherever you like. If you're on OS X and want to replace the default version, you'll put it in /usr/share with admin privileges.
- You may wish to check your installation according to the Ant installation instructions
Getting the optional Ant task 'Script'
- Inside your new ant directory, also with admin privileges (think "sudo" on Unix), run ant -f fetch.xml
Getting and configuring Maven
- Download the latest full version of Maven from maven.apache.org
- Configure by following the Maven installation instructions
Getting the Fluid Infusion source and build scripts
- Using svn check out the latest Fluid Infusion tag
svn co http://source.fluidproject.org/svn/fluid/infusion/tags/fluid-1.0/
Using the custom build scripts
- go into the build-scripts directory in your checkout of Fluid Infusion
- run the custom build ant target. Custom build has three optional parameters: 'include', 'exclude', and 'jsfilename'
The values passed to 'include' and 'exclude' are comma separated lists of module names. If you specify a module to include, all of the module's dependencies will also be included. By contrast, if you specify a module to exclude, only that module will be excluded - not its dependencies.
| Use excludes with caution If you exclude a module that is a required dependency, then it must be included in your website in another way for Infusion components to work. |
Valid modules for Fluid Infusion 1.0 are:
- framework
- fss
- fssReset
- fssLayout
- fssText
- fssThemes
- renderer
- inlineEdit
- pager
- progress
- reorderer
- tableOfContents
- uiOptions
- undo
- uploader
- fastXmlPull
- json
- jQuery
- jQueryUICore
- jQueryUIWidgets
- jQueryTooltipPlugin
- swfupload
- swfobject
"fss" is all that is needed to include all of the fss. If you would only like specific fss modules, you can simply include those individual ones. If you wish to exclude all of fss, you will need to exclude all fss modules, the individual and the single "fss" modules. |
The value passed to 'jsfilename' is the desired filename to use for the custom build. The default, if unspecified, is MyInfusion.js.
For example, to create a custom build of Inline Edit and UI Options, without jQuery, use:
ant customBuild -Dinclude="inlineEdit, uiOptions" -Dexclude="jQuery" -Djsfilename="MyOwnInfusion.js"
You will now find a products directory as a sibling to the build-scripts directory. Inside, you'll find a dist and src-dist directory. They have virtually the same contents with the exception that the javascript and CSS files in the dist directory have been minified and the dist directory contains a war file with the modules that are included in the custom build.
If you create a custom build of a module that does not contain javascript (i.e. the FSS) then the 'jsfilename' will be ignored, but a minified version of the custom build files will still be created in the dist and src-dist directories.
As of Infusion 1.1.2.1 the results in the products directory is a single zip file which contains minified files. If you want the files to be unminified, pass noMinify=true to the custom build target. |
Custom build with no parameters
If you use custom build with no parameters, everything, except for the tests and samples, is included. In addition, the resulting build files in the products/dist and products/src-dist directories are named InfusionAll.js files, rather than MyInfusion.js.