Results 1 to 3 of 3

Thread: Why place Sencha files in a "Sencha" sub-folder within Project?

  1. #1

    Default Why place Sencha files in a "Sencha" sub-folder within Project?

    I want to be able to have the index.html execute from the root of the web API project. When the Sencha with API project files are created, all sencha files are created within a "Sencha" sub-folder, forcing me to execute the app via http://localhost/Sencha/index.html. I want to be able to go to http://localhost/index.html for the app.

    The work around is to not use the plugin templates to create the project. Is there going to be a fix for this or is this by design? I believe the original plugin did not put files in a Sencha sub-folder and all was good.

  2. #2
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    395
    Answers
    25

    Default

    Most likely, "Sencha" is the path you (or another member of your team) chose when generating the application.

    If this is inside a workspace, then you'll indeed note that running "sencha app watch" will start a web server on the workspace directory, effectively requiring you to open "http://localhost:1841/{AppPath}/". This is by design since many apps can coexist in the same workspace, the shared fraemwork(s) are located in the workspace root (for example: "http://localhost:1841/ext").

    If this is a standalone application (where "app.json" and "workspace.json" are on the app root) then you can safely copy all contents of that "Sencha" directory one level above.

    Remember that Ext JS apps are meant to be distributed after being built, so even if you have the "/Sencha/" path while on development, once you run "sencha app build" you'll get all the files you need concatenated and minified on the build directory. You can then copy these files to your production server and no extra paths/files will be necessary.
    Israel Roldán | Senior Software Engineer (Framework tools)

  3. #3

    Default

    Quote Originally Posted by israelroldan View Post
    Most likely, "Sencha" is the path you (or another member of your team) chose when generating the application.
    No, in fact the application name is completely different. The plugin generates a Subfolder named "Sencha" and creates a workspace and application within this "Sencha" folder. No workspace files are created in my API project's folder.

    Quote Originally Posted by israelroldan View Post
    If this is inside a workspace, then you'll indeed note that running "sencha app watch" will start a web server on the workspace directory, effectively requiring you to open "http://localhost:1841/{AppPath}/". This is by design since many apps can coexist in the same workspace, the shared fraemwork(s) are located in the workspace root (for example: "http://localhost:1841/ext").
    This leads me to my other post here, As a .NET/Visual Studio developer, we want to be able to use Visual Studio standard practices of running the application via F5.

    Quote Originally Posted by israelroldan View Post
    If this is a standalone application (where "app.json" and "workspace.json" are on the app root) then you can safely copy all contents of that "Sencha" directory one level above.
    This is essentially what we have to do, although it seems "safer" to simply run the Sencha Cmd commands to create an app within the root project directory.

    Quote Originally Posted by israelroldan View Post
    Remember that Ext JS apps are meant to be distributed after being built, so even if you have the "/Sencha/" path while on development, once you run "sencha app build" you'll get all the files you need concatenated and minified on the build directory. You can then copy these files to your production server and no extra paths/files will be necessary.
    This I did notice after I did a "publish" to deployment package. The plugin did run the build production and deployed to the root of the site inside the deployment package. I just wish it was a little more organized, and again, wishing I could just F5 and not worry about the /Sencha/ sub-folder in the URL. Like you said, I could just move files up a level. The weird thing is, the first version of this plugin, that's how it worked out of the box. Now it's creating this Sencha sub-folder. I'm just curious as to why.

Similar Threads

  1. Replies: 45
    Last Post: 10 Jun 2015, 2:02 PM
  2. Replies: 0
    Last Post: 26 Sep 2014, 4:27 PM
  3. Replies: 7
    Last Post: 24 Apr 2014, 12:15 PM
  4. Replies: 4
    Last Post: 7 Apr 2013, 1:33 PM
  5. Replies: 3
    Last Post: 11 Feb 2013, 5:50 PM

Posting Permissions

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