1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default sencha sdk -> cmd

    sencha sdk -> cmd


    hi,

    i am facing issues by running something like this at the moment. It looks sencha sdk is just hanging on OSX, never comes back. Any idea?
    Code:
    sencha create jsb -a http://localhost:9002/development.html -p /Users/vuukie/Workspaces/cafe4/src/main/webapp/app.jsb3
    It that reason I thought it is time to move to Cmd v3 as using 4.1.x for my projects. But could not find "sencha create" with cmd v3. What is the syntax for it?

    thx,
    Zol

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Cmd doesn't use jsb files. Just need to build the app and it will figure out the dependencies based on the requires and other factors.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default


    hi,

    I am bit confused with your answer. The documentation is about to wait till using cmd. http://docs.sencha.com/extjs/4.1.3/#!/guide/command
    It says:
    Sencha Cmd is designed for Sencha Ext JS version 4.1.1a or higher and Sencha Touch version 2.1 or higher. Many of the new features of Sencha Cmd require framework support that is only available at these version levels. There are some low-level commands that can be used for older versions of Sencha frameworks or JavaScript in general.
    If you are using an older version of Ext JS, you may use Sencha Cmd's build command to build via your JSB file. In other words, Sencha Cmd can replace JSBuilder to produce a compressed build of the files described in a JSB file. Sencha Cmd will not update your JSB file as was done by the previous SDK Tools v2. If your build process requires this support, then you should wait to upgrade to Sencha Cmd.
    In my case project is 4.1.3, can I make the whole built procedure with cmd v3? (in other words: Can I deprecate sdk tools? Both sdk-tool and cmd v3 is not working on the same os x imac).

    Can you give me a simple example how to use cmd v3 to create app-all.js ?


    thx,
    Zol

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    4.1.3 should use Cmd. The documentation was updated and will work if you look at the docs for 4.2.0:

    http://docs.sencha.com/extjs/4.2.0/#!/guide/command
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default


    thanks Mitchell, I have read thru that links, and also advanced cmd page, also checked comments. Ant other also confused with 'build', does it, or does not need jsb3?

    This was my old SDK-Tool based command to minimize my js (encapsulated into a maven build):
    Code:
    sencha build -p /Users/me/prjname/src/name/webapp/apps.jsb3 -d /Users/me/prjname/src/main/webapp -v
    And this commmand made app-all.js just fine. The jsb3 was generated like this:
    Code:
    sencha create jsb -a /Users/me/prjname/src/main/webapp/indexjsb3.html -p /Users/me/src/main/webapp/app.jsb3 -v
    So, you say no jsb3 needs at all. I have tried many things, but still not sure what to do, and how to give the entry point to cmd. My app.js is under /Users/me/prjname/src/main/webapp/app.js, and I am looking for a compressed output in the same folder (or anywhere) just called app-all.js.

    In the documentation that simply task is missing.
    Code:
    sencha help build
    is telling
    This command is used to process a legacy JSBuilder ("jsb") file.
    Do I need a jsb3 file, or not?

    What is the "category" for sencha cmd to make this. I have also tried to do sencha compile concatenate... No luck at all.

    The most promising attempt was:
    Code:
    sencha help app build
    as this having a flag as destination.

    But let me start, and maybe you can correct me how to do this with cmd 3.1.0:
    Code:
    sencha app build -a /Users/me/prjname/src/main/webapp/indexjsb3.html -d /Users/me/src/main/webapp
    Flag -d (debug) and -v (verbose) is available?

    thx

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    A quick run down of useful commands.

    To create an application with Cmd you do:

    Code:
    sencha generate app MyApp /path/to/MyApp
    This will create a skeleton app that you can then copy your application in to to "upgrade" it from your old app to a Cmd application.

    Once in a Cmd application you can then use this command to do a build:

    Code:
    sencha app build
    This will create a production build, to do a testing build you can do

    Code:
    sencha app build testing
    This does not use a jsb file anymore, it will go through your code and evaluate the requires properties (stores, models, etc).
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  7. #7
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default


    hi,

    app generated like this:
    Code:
    sencha -s /Users/me/extjs-4.1.3/ generate app MyApp /Users/me/MyApp
    Do I need the whole lot from this structure? The only two makes sense me are:
    - app
    - ext
    Probably other two folders also not hurt:
    - packages
    - resources

    But what about bootstrap.js, build.xml? What are these files?

    And what do you suggest for me, what is best practice to weave in my existing structure (cvs stored project), I need to add MyApp such as webapp but not in root level, just as src/main/webapp/. Will that work if I move some files?
    Currently I have in my src/main/webapp these things:
    - app.js
    - ext folder
    - app folder (mvc)

    thx a lot

  8. #8
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default


    hi, almost there.

    How can I set to target folder where to write all.js?
    Code:
    sencha -cw /Users/me/Workspaces/MyPrj/src/main/webapp app build -d /Users/me/Workspaces/MyPrj/src/main/webapp

    this writes into:
    [INF] Concatenating output to file /Users/me/Workspaces/MyPrj/src/main/webapp/build/MyApp/production/all-classes.js
    thx

    ps: app-all.js not made any longer?

  9. #9
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by zlevardy View Post
    ps: app-all.js not made any longer?
    Correct. If you need an unminified build, use the testing argument in the app build command.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  10. #10
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    131
    Vote Rating
    5
    zlevardy is on a distinguished road

      0  

    Default


    Hi Mitchell,

    and with my command:
    Code:
    sencha -cw /Users/me/Workspaces/MyPrj/src/main/webapp app build -d /Users/me/Workspaces/MyPrj/src/main/webapp
    why not write all-classes.js into my webapp folder? This -d option does not work?

    thx

Thread Participants: 1