1. #1
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    88
    Vote Rating
    1
    extjs@peacetech.com is on a distinguished road

      0  

    Default How to build only application files leaving ext files in ext-all

    How to build only application files leaving ext files in ext-all


    We have some legacy code which does not follow MVC at all (many classes in the same file, Ext.define, requires not used etc) we need to extend this application and want to use MVC for the new code and gradually refactor legacy code. Thus we need to be able to have a MVC compliant packaging of new code (consolidated file muct include individual classes in correct order) separate from Ext library code separate from legacy code so it can be included in following order

    - ext
    - legacy
    - new MVC compliant code

    I am new to cmd and could not figure out how to do it. I was reading compile docs and did not find any way to tell it to only include my application classes into the output file because I intend to use ext-all

    I would greatly appreciate your advise
    Alex

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,335
    Vote Rating
    129
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Do you need these in separate concatenated outputs or would it suffice to get them in the right order and still have a single file?

    If the latter is workable for you, and if you can use the page compile command, here is a way to do it:

    Code:
        <!-- <x-compile> -->
            <!-- <x-bootstrap> -->
                <script src="ext/ext-dev.js" type="text/javascript"></script>
            <!-- </x-bootstrap> -->
    
            <script src="legacy/foo.js" type="text/javascript"></script>
            <script src="legacy/bar.js" type="text/javascript"></script>
    
            <script src="app/app.js" type="text/javascript"></script>
    
        <!-- </x-compile> -->
    The above will tell the compiler about the legacy files and their order with respect to each other (the compiler will inject dependencies between each script tag to preserve this).

    To ensure that the framework comes before the legacy files, you can add something like this to the first one:

    Code:
        //@require Ext.grid.*
    Or you can put that one line in a new script and place it before the first legacy file. If you need several such directives to declare what you need (vs "Ext.*") then the new file may be easy to reuse across pages.

    If you cannot use the page compile command, it will help to know how you currently handle load order of your legacy files.

    The low-level commands to do this kind of thing are discussed in http://docs.sencha.com/ext-js/4-1/#!...mand_app_multi in the "Alternative Strategy - Sharing A Framework Subset" section. If you need to drop the page commands, you can still bring in the JS files by adding the folders to the classpath. That is mostly what the page command does behind the scenes (that and it performs the dependency scan / recursive union on the files directly used by the page but that is also achievable without the page command).
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

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