Results 1 to 9 of 9

Thread: Exclude Specific JSResource from production build.

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    110
    Answers
    2

    Default Exclude Specific JSResource from production build.

    Hi All,
    I am using Sencha Architect version:3.2.0.75.
    In my project we created one JSResource with name config.js.In this resource define one 'singleton' class and configured all services URLs.
    My requirement is :
    -We want exclude this config.js file from production build.
    -After production build, if user changed any existing configuration of config.js resource.Application need to run without any production rebuild.


    config.js resource sample content.
    Code:
        Ext.define('Demo.utils.Config', {
        alternateClassName: [
        'Config'
        ],
        singleton: true,
        service1:'https://abc.com/service1',
        service2:'https://abc.com/service1',
         ------------,
         ------------,
        service10:'https://abc.com/service10'
    });
    For example in above my scenario "If user change domain name of services url,without any production rebuild application need to run ".

    Help me sencha expats with exact solution.
    Great thanks to advance......
    Dinesh GK

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    110
    Answers
    2

    Default

    Any solution ?
    Dinesh GK

  3. #3
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795
    Answers
    103

    Default

    Hi

    I know that in ExtJS code you can use // <debug>

    Code:
    // <debug>  
    some code ...
    // </debug>
    And Cmd will ignore the code between the debug in the production build. But I not sure how to achieve this in Architect.

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    110
    Answers
    2

    Default

    No LUCK .......
    Dinesh GK

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    110
    Answers
    2

    Default

    Hey... Is it possible or not with Sencha Architect ?
    No one have this requirement or faced problem like this ?
    Help me....
    Dinesh GK

  6. #6

    Default

    I think it depends on the version of ExtJS and Sencha cmd you are using.

    If I create a new project with the latest version of SA (3.2.0.279), I need to disable the Cmd option x-compile (ExtJS 4.2) or includeInBundle (ExtJS 5) of the JS resource.

  7. #7
    Sencha User
    Join Date
    Apr 2012
    Posts
    110
    Answers
    2

    Default

    aburke85 thanks for the reply... But it is not working...

    Any other way to achieve this requirement........
    Any suggestions ...
    Dinesh GK

  8. #8
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by DineshGudikandula View Post
    aburke85 thanks for the reply... But it is not working...

    Any other way to achieve this requirement........
    Any suggestions ...
    What is the "bootstrap" setting for your JS resource? I believe if you set bootstrap=true, it will not be bundled as a part of the production build.

    Thanks
    Joel

  9. #9
    Sencha User
    Join Date
    Apr 2012
    Posts
    110
    Answers
    2

    Default

    Quote Originally Posted by joel.watson View Post
    What is the "bootstrap" setting for your JS resource? I believe if you set bootstrap=true, it will not be bundled as a part of the production build.

    Thanks
    Joel

    {
    "path": "app/utils/config.js",
    "bootstrap": true,
    "x-compile": true
    }
    Dinesh GK

Similar Threads

  1. Exclude files from build
    By Dumas in forum Sencha Cmd
    Replies: 14
    Last Post: 26 Sep 2016, 2:32 AM
  2. Sencha Cmd - Exclude Ext from build
    By heratech in forum Sencha Cmd
    Replies: 3
    Last Post: 20 Jan 2014, 12:06 AM
  3. [CMD 4.0.0.203] Exclude .svn folders from build
    By michael.johnson in forum Sencha Cmd
    Replies: 2
    Last Post: 14 Dec 2013, 5:19 AM
  4. Replies: 7
    Last Post: 23 Aug 2012, 9:44 AM

Posting Permissions

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