Hybrid View
-
25 Sep 2012 6:34 AM #1Sencha - Architect Dev Team
- Join Date
- Jan 2009
- Location
- Frederick, Maryland
- Posts
- 73
- Vote Rating
- 3
Sencha Cmd v3.0.0.141 Build Process
Sencha Cmd v3.0.0.141 Build Process
SDK: ExtJS 4.1.1a
Platform: Windows x64
I make it through the entire build process executing the following command:
My pre-build index.html looks like so:sencha app build
My build index.html looks like this:HTML Code:<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>metrics_cmd_extjs</title> <link rel="stylesheet" href="resources/css/default/app.css"> <link rel="stylesheet" href="resources/css/default/metrics.css"> <link rel="stylesheet" type="text/css" href="ext/examples/ux/css/CheckHeader.css"> <!-- <x-compile> --> <!-- <x-bootstrap> --> <script src="ext/ext-debug.js"></script> <script src="bootstrap.js"></script> <!-- </x-bootstrap> --> <script src="app/app.js"></script> <!-- </x-compile> --> </head> <body> <div id="logo"></div> <div id="loadingapp">Please wait...</div> </body> </html>
I receive the following error in Chrome:HTML Code:<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>metrics_cmd_extjs</title> <link rel="stylesheet" href="resources/css/default/app.css"> <link rel="stylesheet" href="resources/css/default/metrics.css"> <script type="text/javascript" src="all-classes.js"></script> </head> <body> <div id="logo"></div> <div id="loadingapp">Please wait...</div> </body> </html>
Obviously the error is happening in the [build] produced file "all-classes.js"Uncaught TypeError: Cannot call method 'define' of undefined
It seems to me there is a file not being included in my build index.html that defines Ext. Am I missing something here?HTML Code:Ext.define("Ext.data.ResultSet"......
-
25 Sep 2012 7:21 AM #2Sencha - Architect Dev Team
- Join Date
- Jan 2009
- Location
- Frederick, Maryland
- Posts
- 73
- Vote Rating
- 3
If I run the skelaton app (the one produced by the generate command) through the build process this is what first appears in all-classes.js:
When I run my app through the build process, this is what appears first in all-classes.js prior to Ext being set:HTML Code:var Ext=Ext||{};
HTML Code:Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});
-
26 Sep 2012 10:09 AM #3
index prep
index prep
Are we supposed to modify index.html prior to running a build?
For example, are we supposed to replace 'ext-debug.js' with 'ext-all.js' or something like that?
-
27 Sep 2012 3:30 AM #4Sencha - Architect Dev Team
- Join Date
- Jan 2009
- Location
- Frederick, Maryland
- Posts
- 73
- Vote Rating
- 3
-
27 Sep 2012 5:03 AM #5Sencha - Architect Dev Team
- Join Date
- Jan 2009
- Location
- Frederick, Maryland
- Posts
- 73
- Vote Rating
- 3
-
29 Sep 2012 12:24 AM #6
This is discussed in http://docs.sencha.com/ext-js/4-1/#!...and_app_single but in short, the index.html should not need to be edited unless you are dealing with 3rd party sources that don't work as simple add-ons to your classpath. See also http://www.sencha.com/forum/showthre...ndor-libraries
The compiler will process everything inside the "x-compile" section. It removes and does not parse the nested "x-bootstrap" section. If you need code that cannot be combined in to your "all-classes.js", this can be placed outside the "x-compile" block.
I hope that helps clarify this a bit.
Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote
