PDA

View Full Version : Packaging of Sencha SDK when deploying



marceloverdijk
18 Jan 2012, 3:46 AM
All the examples mention to just unpack the Sencha SDK and put in the apps /lib folder.
The Sencha SDK contains also docs, sources, pkgs and a bunch of js files in the root.

I wonder if there are any guidelines which files are actually needed (e.g. during deployment).


Cheers,
Marcel

mitchellsimoens
18 Jan 2012, 4:34 AM
Deployment should only need the CSS (and images associated) and the sencha-touch.js file. All the widgets and application files should be compiled into a single JS file, app-all.js.

marceloverdijk
18 Jan 2012, 5:01 AM
When you talk about compiling the widgets and application files into a single js files you talk about the jsbuilder?
I need to look into that later.

For now I'm uploading a quick demo to a webserver but don't want to upload the full 80mb Sencha SDK
This contains:
/docs
/examples
/pkgs
/resources
/src
and a bunch of sencha js files off course.

For a simple demo I think would only need:
/sencha-touch.js
/resources/css

Right?

mitchellsimoens
18 Jan 2012, 5:15 AM
Yes... SDK Tools should build an MVC app into a single JS file with the needed Sencha Touch files. This is only semi-automatic, you have to setup your app classes to require the widgets.

Yes, the sencha-touch.js and /resources/css should be all. If there are any images the CSS needs you will need that. The preferred way is to use SASS to combine your CSS and Sencha Touch's CSS into a single file aswell.