Build system changes
NOTE: The most up-to-date information on the build system is in the 0.9 Dojo Book.
The build system no longer requires Ant to run, but uses just Java 1.4.2 or greater. It is also in the util subversion repository (not part of the Dojo core's subversion respository).
To do a build, you need to get a the full Dojo source, which you can obtain at http://download.dojotoolkit.org/release-0.9.0. The source builds are suffixed with "-src". If you want to download the latest code from the Subversion code repository, see the Use Subversion page.
Once you have the Dojo source, go to the directory that has the source, and cd util/buildscripts.
To run the build on Windows:
> cd util\buildscripts > build.bat
To run the build on other systems:
> cd util/buildscripts > build.sh
Running that command will give you some help text about how to run a specific build, and the valid options for a build. All the options are name=value pairs that come after build.js. For example, to build the base dojo.js, run:
> build.sh profile=0.9 action=release
The build will show up in a release directory that is a sibling to util. The build output should also mention the location of the build.
Build profile changes
The contents of the profile files used in the build have changed a little bit. The "base Dojo" functionality is normally all that is built into dojo.js now, and specifying what modules you want to include in a built file is the responsibility of the dependencies.layers array.
Here is an example that illustrates the new profile file format. This build profile with produce a dojo.js with the "base Dojo" functionality, and a "progress.js" file that includes the modules that are needed for using the dijit.ProgressBar widget. It also copies the dijit and dojox projects to the release area.
dependencies = {
layers: [
{
name: "progress.js",
layerDependencies: [
"dojo.js"
],
dependencies: [
"dijit.ProgressBar"
]
}
],
prefixes: [
[ "dijit", "../dijit" ],
[ "dojox", "../dojox" ]
]
}If you prefer the 0.4.x ability to include other modules in dojo.js besides the base Dojo functionality, just define a layer called dojo.js. It MUST be the first layer in the layers array. This example will produce a dojo.js that includes all the base Dojo functionality plus the code needed for dojo.string and dojo.dnd:
dependencies = {
layers: [
{
name: "dojo.js",
dependencies: [
"dojo.string",
"dojo.dnd"
]
}
]
}- Printer-friendly version
- Login or register to post comments
- Unsubscribe post
