I have used the below (1.7) custom build profile to build my release folder.
var profile = {
basePath: "..",
action: "release",
cssOptimize: "comments",
mini: true,
optimize: "closure",
layerOptimize: "closure",
stripConsole: "all",
selectorEngine: "acme",
packages:[
{
name: "dojo",
location: "./../../dojo"
},
{
name: "dijit",
location: "./../../dijit"
},
{
name: "dojox",
location: "./../../dojox"
}
],
layers: {
"dojo/dojo": {
include: [
"dojo/dojo",
"dijit/form/Button",
"dojox/form/TimeSpinner"
],
customBase: true,
boot: true
}
},
resourceTags: {
amd: function (filename, mid) {
return /\.js$/.test(filename);
}
} };
In my web application, I am using just two components, one is Button from 'dijit' package and another one is TimeSpinner from 'dojox'. So, I have included these two components in to 'dojo/dojo.js' file, it is working as I have expected.
But the release folder contains the folders 'dojo', 'dijit' and 'dojox' with lot of files.
Most of the components are not used in my web application, but their files are present in the release folder. Even though they will not be loaded in to the browser (because of AMD), I don't want to have such files in my release folder.
It is unnecessary to maintain such huge number of files in my subversion.
So, my questions are below:
- How to remove '.uncompressed.js' files from the release folder?
- How to remove the files, CSS, templates of unused components from the release folder ?
Please help me...
The dojo build utility is not meant to separate a subset of files and does not have configuration for this.
The builder makes compression, it wraps legacy modules into amd styled declarations and it combines layers in a cached module loading fashion.
This means that once you create the dojo/dojo, customBase (this is highly advanced setting btw, careful with usage) layer - a dependency tree is built. The dependency tree is a list of files which each are compressed and sutured together similar to following;
What if your visitor has a base-dependency which youve left out?
Anyways, the older build utility had a functionality dependencyList which is not present at the 1.7 build utility. This would have 'saved' you :)
If youre 100% certain that the only file which is needed is your layerfile - why not simply upload that single file to your webhotel?