12 Aug 2013 7:58 PM #1
Answered: Include only required classes in ext-all.js
Hi, I want to reduce the size of ext-all.js.
Refer to some posts, I think the proper way is to generate a jsb file of my project and build an app-all.js only include required classes, then use ext.js instead of ext-all.js.
My project architecture as below
app --module1 --controller --model --store --view --module2 --controller --model --store --view ...... extjs-4.2 app.js main.html ......
Sencha Cmd does this automatically ... it reads your classes and then creates and all-classes.js that includes the required classes for your app, as well as your app.
You can always use the 'sencha compile' aspect of Cmd to create custom versions. This is low level and usually not required.
If you are moving from JSB (tools) to Cmd .. you will need to generate a new app with your namespace and the move your existing files over to the new;y generated app, as there is metadata that is created for Cmd. You would need to then run 'sencha refresh' after you have moved your app files over to update your meta with the app classes.
If you run sencha app generate and sencha app build, that will create you a full working example.
sencha -sdk /path/to/sdk generate app MyApp /path/to/myapp sencha app build