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:
Please help me...
You can add the following lines at the bottom of build.sh
find . -type f -name '*.uncompressed.js' -print0 | xargs -0 rm -rdf
find . -type f -name '*.consoleStripped.js' -print0 | xargs -0 rm -rdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With