Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I deploy ExtJS 4.2.2 to production for app not initially created with Sencha Cmd?

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!

like image 258
Greg Lafrance Avatar asked Dec 05 '25 10:12

Greg Lafrance


1 Answers

1) We can deploy & compile our application , even if we have not created the project using sencha CMD. We have to follow the standard application structure given in their tutorial/docs

2)Yes by compiling our js files using sencha compiler/sencha cmd minifies our code to a single file say xyz.js file, so in webapps folder only one file is needed not all other js files containing src code also the import statement in some parent jsp files need to be updated accordingly, instead importing "app.js" . By this process the performance is upgraded as only required/used components are complied.

Note : While compiling our src files,If any component say button,grid etc in any file is used without mentioning its xtype in 'requires[]' field in that particular view file then errors are thrown which are very difficult to track, So make sure all requires[] are updated.

like image 132
siddhesh shinde Avatar answered Dec 08 '25 06:12

siddhesh shinde



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!