1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    62
    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.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      1  

    Default


    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.

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

      0  

    Default


    Hi scottmartion, thank you for your reply, it's what I looking for. But when I generate my app, the following errors occur...

    ......
    [INF] [x-property-file] Updating property file: /Volumes/zzgHD/ASTRI/HEMS/hems/fe/web/.sencha/app/sencha.cfg
    [ERR]
    [ERR] BUILD FAILED
    [ERR] java.lang.NullPointerException
    [ERR]
    [ERR] Total time: 1 second
    [ERR] com.sencha.exceptions.BasicException
    [ERR] com.sencha.exceptions.BasicException

  5. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Can you post your generate command?

    What if you generate to a local path? Is your path a LAN drive?

    Scott.

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

      0  

    Default


    My path is my local drive, the commands as below:

    ZZGs-MacBook-Pro:/ ZZG$ cd /Volumes/zzgHD/ASTRI/HEMS/hems/fe/extjs-4.1.3
    ZZGs-MacBook-Pro:extjs-4.1.3 ZZG$ sencha generate app HEMS /Volumes/zzgHD/ASTRI/HEMS/hems/fe/web

  7. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    See if you get a better result with specifying the SDK

    Code:
    sencha -sdk /Volumes/zzgHD/ASTRI/HEMS/hems/fe/extjs-4.1.3 generate app HEMS /Volumes/zzgHD/ASTRI/HEMS/hems/fe/web
    Scott

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

      0  

    Default


    Hi Scott, I tried, but still the same error. And I found this post looks the same problem but no answer yet

    http://www.sencha.com/forum/showthre...interException

    Thank you

  9. #8
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,927
    Answers
    656
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Perhaps try uninstalling and reinstall everything from scratch (Sencha Cmd) .. did you upgrade from a previous version?

    What versions of Ruby, Compass, Java do you have installed?

    Code:
    Scotts-MacBook-Pro:~ scottmartin$ sencha -sdk /Users/scottmartin/Sites/extjs413 generate app Test /Users/scottmartin/Sites/test413 > gen.log
    Scotts-MacBook-Pro:~ scottmartin$ cat gen.log
    Sencha Cmd v3.1.2.342
    [INF] 
    [INF] init-plugin:
    [INF] 
    [INF] -before-generate-workspace:
    [INF] 
    [INF] cmd-root-plugin.init-properties:
    [INF] 
    [INF] init-properties:
    [INF] 
    [INF] init-sencha-command:
    [INF] 
    [INF] init:
    [INF] 
    [INF] generate-workspace-impl:
    [INF]      [echo] generating into /Users/scottmartin/Sites/test413 from /Users/scottmartin/Sencha/Cmd/3.1.2.342/templates/workspace
    [INF]     [mkdir] Created dir: /Users/scottmartin/Sites/test413/packages
    [INF] 
    [INF] cmd-root-plugin.copy-framework-to-workspace-impl:
    [INF] [propertyfile] Updating property file: /Users/scottmartin/Sites/test413/.sencha/workspace/sencha.cfg
    [INF] 
    [INF] copy-framework-to-workspace-impl:
    [INF]      [copy] Copying 1925 files to /Users/scottmartin/Sites/test413/ext
    [INF]      [copy] Copying 86 files to /Users/scottmartin/Sites/test413/ext/src/ux
    [INF] [propertyfile] Updating property file: /Users/scottmartin/Sites/test413/.sencha/workspace/sencha.cfg
    [INF] 
    [INF] copy-framework-to-workspace:
    [INF] 
    [INF] generate-workspace:
    [INF] 
    [INF] -after-generate-workspace:
    [INF] 
    [INF] init-plugin:
    [INF] 
    [INF] cmd-root-plugin.init-properties:
    [INF] 
    [INF] init-properties:
    [INF] 
    [INF] init-sencha-command:
    [INF] 
    [INF] init:
    [INF] 
    [INF] before-upgrade:
    [INF] 
    [INF] generate-app-impl:
    [INF] 
    [INF] generate-starter-app:
    [INF] [x-property-file] Updating property file: /Users/scottmartin/Sites/test413/.sencha/app/sencha.cfg
    [INF] 
    [INF] init-plugin:
    [INF] 
    [INF] cmd-root-plugin.init-properties:
    [INF] 
    [INF] init-properties:
    [INF] 
    [INF] init-sencha-command:
    [INF] 
    [INF] init:
    [INF] 
    [INF] app-refresh-impl:
    [INF] Loading classpath entry /Users/scottmartin/Sites/test413/ext/src
    [INF] Loading classpath entry /Users/scottmartin/Sites/test413/app
    [INF] Loading classpath entry /Users/scottmartin/Sites/test413/app.js
    [INF] Appending concatenated output to file /Users/scottmartin/Sites/test413/bootstrap.js
    [INF] Appending concatenated output to file /Users/scottmartin/Sites/test413/bootstrap.js
    [INF] Appending concatenated output to file /Users/scottmartin/Sites/test413/bootstrap.js
    [INF] 
    [INF] app-refresh:
    [INF] 
    [INF] after-upgrade:
    [INF] 
    [INF] generate-app:
    [INF] 
    [INF] -after-generate-app:
    [INF] [x-property-file] Updating property file: /Users/scottmartin/Sites/test413/.sencha/app/sencha.cfg
    Scott

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

      1  

    Default


    Hi Scott, problem solved after uninstall and reinstall everything! Maybe I made some mistake when I was doing upgrade from the previous version. Thank you very much!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi