Our theme is created, so now the only thing left is to make the production build and deploy the code on the production web server. Again, we will use Sencha Cmd to do it for us.
To do a production build we need to have a terminal opened. We also need to change the directory to the application's root directory and type the following command:
sencha app build
Once the command execution is completed, it will create a new directory called build/NameofTheApp/production
. As our application namespace is Packt, it created the build/Packt/production
directory as follows:
What this command does is to get all the code we developed (inside the app
folder) along with the Ext JS code we need to run the application and put it inside the all-classes.js
file. Then, using YUI Compressor, Sencha Cmd will minimize the code and obfuscate the JavaScript code; this way we will have a very small JavaScript file that the user will need to load. Also, Sencha Cmd will evaluate...