How To Include Normal Javascript Files In Sencha Touch
Posted by blogmeister on
September 7, 2012
You can add normal Javascript files with functions or variables and re-use them within your Sencha Touch project by going to app.json and look for the line where “js” is where paths are specified.
Simple add another entry specifying the folder and Javascript filename.
|
1 2 3 4 5 6 7 8 9 |
"js": [ { "path": "util/Test.js" }, { "path": "sdk/sencha-touch.js" }, { "path": "app.js", "bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */ "update": "delta" } ], |
In the sample code above, the Test.js Javascript file is placed in a folder named util which is located in the same folder where app.json is.
Found this useful? Donations appreciated to help keep this blog alive.







