PDA

View Full Version : Deploy ExtJS 4.2.2 to production for app not initially created with Sencha Cmd.



xjscrafter
2 Feb 2014, 9:03 AM
We have an app that was not initially created with Sencha Cmd.

While we will eventually restructure the app to adhere to the structure that works best with Sencha Cmd, for now we just need to know the steps to deploy the app to production in our case.

1) For example, I've heard we need to minify the code by building with Sencha Cmd. Can we do that even if our app was not initially created using Sencha Cmd?

2) I've also heard that we can use Sencha Cmd to ensure that the minified file only contains the classes that are actually used by our application (even reducing the number of ExtJS core classes included). Is that true and if so, can we do that even if our app was not initially created using Sencha Cmd?

3) Anything else to deploy our app to production, especially considering our app was not initially created using Sencha Cmd?

Thanks much in advance!

scottmartin
2 Feb 2014, 1:57 PM
You will need to create your app with Cmd to take advantage, as it needs to take advantage of all meta that is created under .sencha
DIR when you generate your app.

The best solution would be to generate a new app with the same namespace and then copy all of your code over to the app DIR, then run 'sencha app refresh' to update your meta to find your app classes.

This is all based on how you setup your app to adhere properly as it is not automatic.

Sencha Cmd will only load what is needed, but you can also compile your own version if you want with 'sencha compile ...'
But that is usually not needed.

If you just need to minify your app now, then you can simply use yuicompressor: (used by Cmd)
http://yui.github.io/yuicompressor/

xjscrafter
2 Feb 2014, 2:10 PM
Excellent. Thanks very much. We do want to move to the official app structure, but right now we're releasing a new product to beta, and just need it minified.