Threaded View

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Vote Rating
    zzhouag is on a distinguished road


    Default 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

    Is that possible to achieve that under sencha cmd 3.1.2? Are there some examples? Thank you!

  2. 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

Thread Participants: 1