-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Simplify getting started with Dojo, by greatly decreasing the number of files and concepts needed to become productive. Gone are the days of sorting through 20,000 files and their dependencies that might be needed to use Dojo.
-
pre-defined, built/optimized layers for common sub packages of Dojo (a more logical mapping than the current fragmented projects. All Javascript files included in the pre optimized layers are removed from the build output, greatly reducing the overall number of JavaScript files needed to get started.
-
pre-packaged themes (css files & associated resources) for mobile and desktop which have individual .css files rolled up into aggregate CSS layer that's easy to include in HTML pages.
-
pre-packaged localization bundles (multiple bundles, one per language, per major sub package of dojo)
-
AMD Loader (minimal, 4k)
-
Full Core
-
Common UI F/W
-
Desktop UI (dijit)
-
Desktop Theme: Claro (claro)(cross-platform)(optimized)
-
Mobile UI (dojox/mobile)
-
Mobile Theme: iOS (iPad/iPhone)(optimized)
-
Mobile Theme: Android (2.1-3.x)(optimized)
-
Mobile Theme: Blackberry (OS6)(optimized)
-
Mobile Theme: Mobile One UI (future)(cross-platform)(optimized)
-
Vector Graphics API (dojox/gfx)
-
Business Charting (dojox/charting and it's dependencies, with a single default nice looking theme)
-
Grid (gridx)
-
Gauges (dgauge)
-
Calendar (dojox/calendar)
-
Treemap (dojox/treemap)
-
Language packs
Combinations of the above (or finer-grained groupings of modules will be created as needed)
Custom builds for Dojo are an advanced development topic, and doing builds from scratch can be very difficult to achieve because of the many variables and considerable flexibility in build options. Unfortunately, custom builds are a necessity to reduce the number of network requests for resources (the number of resources requested is now higher, due to the finer granularity of modules in Dojo 1.7+)
Because creating builds are very difficult, many new users give up when hitting this complexity barrier.
As described above, we've created a "standard" set of pre-build layers for commonly used Dojo packages. These packages are a trade-off between development complexity and performance optimization, and are intended to be a good starting point when learning Dojo. Once you've learned how to use Dojo (as a black box set of components), you can take the Dojo Build Factory project and tweak it to optimize for your app. With this approach you'll be starting from a working baseline that you can mold to your application's needs.
To build the standard profiles with the Build Factory, do the following:
-
Install Apache Ant and make sure it's set up in your environment properly (1.7-1.8.x have been verified as working)
-
cd into an empty directory that will hold the build factory and Dojo source trees.
-
git clone https://github.com/pruzand/Dojo-Build-Factory.git This will create a directory Dojo-Build-Factory
-
Grab the most recent Closure Compiler zip from http://closure-compiler.googlecode.com/files/compiler-latest.zip
-
Extract the compiler-latest.zip and copy compiler.jar into the build/lib directory.
This will make the Closure Compiler Ant tasks available to the Build Factory.
Closure Compiler is used to optimize out unwanted/unnecessary codepaths from Dojo modules. -
Copy the dojo, dijit, dojox and util source code trees for the 1.7+ version of Dojo you're building under the build/src directory.
Prune any subprojects from dojo/dijit/dojox directories that you know you don't want. -
Run the build:
ant -DprofileFile="profile-mobile-FeP" -DlocaleListParam="null"Note that -DlocaleListParam contains a comma-delimited list of locale identifiers... i18n resource string bundles for the locales specified will be built-into the layers. If null is specified, only the English default strings will be baked into layers and all remaining localized resource bundles will remain as separate bundles. If you do not want the extra localized bundles, you should remove them from the build results.
The build will run for approx 10-20 minutes on a basic system (faster with SSD). If all goes well, you should see the following message: BUILD SUCCESSFUL.
Build results are placed into two parallel directories under the build/result directory:
- compressed - This directory contains the minified (unreadable) version of the built layers and modules.
Use this tree for optimized runtime performance. - uncompressed - This directory contains the un-minified but built version of the layers and modules. Use this tree for src debugging issues in dojo modules.