1. #1
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    42
    Vote Rating
    1
    op1op is on a distinguished road

      0  

    Default How to create a custom build containing only the code that application needs?

    How to create a custom build containing only the code that application needs?


    Sencha Cmd how to create a custom build containing only the code that application needs?

    I use sencha sdktool 2.0 create jsb3 file to build a custom build file,but use cmd ,i dont know how to do so. Cmd can build a final file but can not load other classes if there need .

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    42
    Vote Rating
    1
    op1op is on a distinguished road

      0  

    Default


    Any one help?

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2011
    Posts
    54
    Vote Rating
    1
    maikhorma is on a distinguished road

      0  

    Default


    I recently went though the same issue, it's not perfect but this should get you started. Hopefully you, or some people could offer some improvements. I kind of settled with "good enough" for the moment. The idea is to exclude everything that isn't your app:
    Code:
    sencha compile page -name=page -in index.html -out ../dontuse.html and restore page and exclude -all and include -namespace MyApp and include -file "app/ux/**" and concat ../all-classes.js
    Notes:
    • first I tried to just exclude the Ext namespace, but it turns out the framework also includes about 9k lines of code that doesn't fall into the Ext ns. So I ended up with a "exclude all, then add back in what i need" mindset.
    • dontuse.html is because the output html assumes the extjs framework is minified with your code and isn't. You will need to make/maintain another html file that includes the framework before the rest of the includes.
    • MyApp is the namespace of your application, it equates to something like Ext.create('MyApp.model.User').
    • I have custom overrides and plugins in my app/ux folder that doesn't belong in my app's namespace so I need to include them.
    • Finally: I never got this to include my app.js. I gave up and just include that (uncompressed) in my custom index.html .

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    42
    Vote Rating
    1
    op1op is on a distinguished road

      0  

    Default


    Thank you very much!
    This way is not suit for me.I want to include the normal classes in one file all-class.js and can load other classes in runtime.

Thread Participants: 1