5 May 2012 5:16 PM #1
Unanswered: Deployment of app assets to an absolute/fixed path
I'm using the "sencha" build tool to build/minify my final sencha touch 2 application but have a somewhat unique challenge.
I'm hosting the app in a Sitecore CMS such that pages returned will all have different paths and depths of paths. Every request will return the single same app just with a different context variable set to let it know the path of the item it should display. Our sencha 2 app is built to handle that. For example:
visiting www.website.com/ProductsList.aspx yields:
The app then uses the path variable to get the context it needs.
The challenge is that the resources (including the app.js itself) are, I think, assumed to be relative to the html page's path, such that in the first scenario the microloader will be looking for app.js at /app.js while in the second scenario it will be looking for it at /Products/app.js .
I thought perhaps the app.config would allow resource specification with absolute paths, but it mentions right in there to use relative paths.
Any help would be much appreciated. Thanks!
7 May 2012 5:22 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Agreed, in the meantime I have set symbolic links and it builds just fine for me.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
7 May 2012 5:41 AM #3
Mitchell, it seems like you are talking about build time which is not really my issue. The issue is run time resolution of the paths to the app.js, app.json and other assets. Also I imagine if folks were to try to host an app in sharepoint (yes another MS monster) or on a CDN they might have a similar challenge.
There are clear workarounds for example using mod_rewrite (isapi_rewrite for IIS) for each of the assets or folders, but clearly it would be more direct, simple and maintainable to have this be a deployment parameter that gets baked into the production deployment.
Is there a place I can directly post feature requests for the "sencha" packaging tool?