Results 1 to 4 of 4

Thread: How to exclude classes during build

  1. #1
    Sencha User
    Join Date
    Oct 2013
    Posts
    47
    Answers
    1

    Default How to exclude classes during build

    Is it possible to exclude some namespaces/classes from final app.js during build and load this classes dynamically on demand?

    For example:

    i have two classes:
    - test.view.First -> app/view/First.js;
    - test.view.Second -> app/view/Second.js;

    I need, that app/view/First.js will be concatenated with all other js files, but app/view/Second.js still remains as separated js file for on-demand loading and copied to somewhere in build directory automatically.

    Is it possible at all now?

  2. #2
    Sencha Premium User dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,242
    Answers
    26

    Default

    http://docs.sencha.com/extjs/4.2.2/#...mmand_compiler read the section called 'Conditional Compilation'

    Code:
    foo: function () {
        //<debug>
        if (sometest) {
            Ext.log.warn("Something is wrong...");
        }
        //</debug>
    
        this.bar();
    }
    Cloud Application Architect

    Sencha Specialist / Sencha MVP / Sencha Technical Trainer
    ExtJs Developer + Contributor since 0.2.2 - Champion of the per developer license.

  3. #3
    Ext JS Premium Member burnnat's Avatar
    Join Date
    Jun 2011
    Posts
    418
    Answers
    42

    Default

    The "conditional compilation" feature of Sencha Cmd is useful, but it's usually intended for small portions of code, rather than entire files. To exclude specific files from the build entirely, take a look at this thread. In short, you can modify the Sencha Cmd build.operations property to exclude the files you don't need.

  4. #4
    Sencha User
    Join Date
    Oct 2013
    Posts
    47
    Answers
    1

    Default

    Is there is a way to specify exclude options in sencha app build command params instead of modifying build.xml?

    Is it possible to instruct ant to copy all excluded classes into app directory in production folder?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •