PDA

View Full Version : How to know JS dependency and build a custom version of Sencha Touch



hello2008
7 Nov 2010, 10:29 AM
I know I should use jsbuilder and jsb file to do a custom build, my question is how to know the full js dependency?

For example, if I only use Carousel and want to do only carousel related build.
How to know the full dependency files to be included into jsb file like this:
{
"name" : "Carousel Custom Build",
"target": "pkgs/custom-build.js",
"id" : "carousel-build",
"files" : [
{......},
{"path": "src/widgets/", "name": "Carousel.js"},
{......}
]
}

What I only know is that Carousel extends from Panel and from Container and from Component and from Observable, but that's not enough to write the whole file dependency lists.

And it would be nice if sencha touch team can provide a build list like Ext JS:
http://www.sencha.com/products/js/build/index.php?ver=2.3.0&lib=ext

mitchellsimoens
7 Nov 2010, 9:06 PM
Here is what I would do... look at the API Docs and at the top of each item is what it extends. For example, Carousel extends Panel. Panel extends lib.Panel. lib.Panel extends Container etc. So you can kind of see the structure of what you will need.

Other than that, good ole fashion trial and error.

hello2008
7 Nov 2010, 9:28 PM
Here is what I would do... look at the API Docs and at the top of each item is what it extends. For example, Carousel extends Panel. Panel extends lib.Panel. lib.Panel extends Container etc. So you can kind of see the structure of what you will need.

Other than that, good ole fashion trial and error.

Thanks for your suggestion :)