Threaded View

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

      0  

    Default Answered: Include only required classes in ext-all.js

    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

    Code:
    app
         --module1
              --controller
              --model
              --store
              --view
         --module2
              --controller
              --model
              --store
              --view
         ......
    extjs-4.2
    app.js
    main.html
    ......
    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.

    Code:
    sencha -sdk /path/to/sdk generate app MyApp /path/to/myapp
    sencha app build
    Scott.

Thread Participants: 1