I am attempting to merge and compress require modules into a single file.
For instance, if I have a file named article.js with the following content:
define(["jquery","flexslider","share_div"],function(){});
I wish for all these dependencies to be merged and compressed into one file.
Although my build script is aimed at compression, it does not combine the files together.
This is the content of my build.js file:
{
"appDir": "../js",
"baseUrl": "../js",
"dir": "../www-build",
"mainConfigFile": "../js/common.js",
"modules": [
{
"name": "common"
},
{
"name": "page/article",
"exclude": ["common"]
}
],
"paths": {
"jquery": "empty:",
"jquery_ui": "empty:",
"twitter_bootstrap": "empty:"
}
}
Perhaps my understanding of Require and the build script is incorrect, as I expected the files to be combined together.
Any help on this matter would be greatly appreciated.