I have a dojo build profile that builds two layers- one layer dojo/dojo layer and another layer for my app files.
This all works fine and results in two "big" files (main.js and dojo.js) which contains all the required code.
However, I don't really want to build the "dojo/dojo" layer all the time when building the app, it's taking a long time (>100 seconds) and since that layer doesn't really change dramatically I don't want to keep building it.
The problem is that even with just one layer "app/main" the build is still creating all the dojo/dijit/dojox files and still taking a long time (I know I don't need those files but it's still parsing/optimizing/compressing... all these files).
Is there anyway to avoid this? I just want a simple small build of just my application files.
here is my profile:
var profile = (function () {
var dojoDeps = ['dojo/dom', 'dojo/i18n', 'dojo/domReady', 'dojo/parser'];
var dojoxDeps = ['dojox/grid/DataGrid', 'dojox/data/JsonRestStore'];
var dijitDeps = ['dijit/form/Form', 'dijit/form/ValidationTextBox', 'dijit/form/Button',
'dijit/layout/BorderContainer'];
var allDojoDeps = [].concat(dojoDeps, dojoxDeps, dijitDeps);
var appDeps = ['app/main', 'app/run'];
return {
basePath: '../../../../dojo/dojo-src',
releaseDir: "../../target/dojo-compiled",
releaseName: "",
action: 'release',
cssOptimize: 'comments',
mini: true,
optimize: 'closure',
layerOptimize: 'closure',
stripConsole: 'normal',
selectorEngine: 'lite',
layers: {
'dojo/dojo': {
include: allDojoDeps,
boot: true
},
'app/main': {
include: appDeps,
exclude: allDojoDeps
}
},
staticHasFeatures: {
'dojo-trace-api': 0,
'dojo-log-api': 0,
'dojo-publish-privates': 0,
'dojo-sync-loader': 0,
'dojo-test-sniff': 0
},
packages: [
{
name: "dojo",
location: "dojo"
},
{
name: "dijit",
location: "dijit"
},
{
name: "dojox",
location: "dojox"
},
{
name: "app",
depsScan:false,
location: "../../src/main/webapp/app"
}
]
};
})();
Packages.com.google.javascript.jscomp.Compiler.setLoggingLevel(Packages.java.util.logging.Level.WARNING);