-
5 Sep 2012 7:14 AM #1
Unanswered: Issue with custom javascript includes
Unanswered: Issue with custom javascript includes
I've some helper js files which I use in my app. It works fine in testing & debug mode. But during the production build, it is not included into the app.js. I'd to explicitly include it in the index.html as below. Any reasons why this is happening. Am I doing something wrong here.
Code:"js": [ { "path": "sdk/sencha-touch.js" }, { "path":"app/util/Api.js", }, { "path":"app/util/Helpers.js", }, { "path": "app.js", "bundle": true, }, ],
Code:<script type="text/javascript" src="app/util/Helpers.js"></script> <script type="text/javascript" src="app/util/Api.js"></script> <!-- The line below must be kept intact for Sencha Command to build your application --> <script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>
-
5 Sep 2012 11:56 PM #2
I have the same problem. Everything works in dev and in the "testing" and "package" builds, but the production build does not load the external js file, despite still having it correctly listed in its app.json.
Is this a problem in the production microloader?
EDIT: I am using 2.1.0-b2
-
7 Sep 2012 5:56 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
- Answers
- 3102
If they use the app namespace, why not just add them as required and then they will be part of the build?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
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 services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
7 Sep 2012 7:58 AM #4
-
7 Sep 2012 8:01 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 434
- Answers
- 3102
You put them in the app directory which should be used for app classes. I have util classes in my apps under the app namespace
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
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 services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
7 Sep 2012 8:04 AM #6
I see, and thanks for the reply, but are we talking about external libraries here?
The way I understand, you are talking about util classes that you write yourself, or did I misread?


Reply With Quote