Results 1 to 3 of 3

Thread: Sencha Cmd: copy extern javascript source

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    2

    Default Sencha Cmd: copy extern javascript source

    Hello,
    we have a Sencha Touch project and including dynamic rendered javascript sources from our server in the project.
    This works well in develoment mode.
    How can we include such a "extern" resource in a production build? We like to have a static copy of this in the build package.

    in detail:
    we include a javascript file in the app.json like this: (extern with url)
    Code:
    "js": [
    ...
            { 
                "path": "http://localhost/config.js",
                "update": "delta"
            }
        ],
    When we do a production build this url will be included as extern source with this url.

    Is there a solution to make a copy of this file, during sencha cmd build, and include it as a static file in the package?

    Thank You
    Bunter

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    You would have to manually copy the file to your Touch project. And include the path in your app.json js config. In app.json comments it states that only local resources will be copied.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha Premium User varsos's Avatar
    Join Date
    Feb 2008
    Location
    Long Island, NY
    Posts
    367

    Default

    You could use the -before-page target in the build.xml to download the file to the local package.
    varsos

Posting Permissions

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