Packaging the application for production
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
Here's how the command looks on the terminal:
- Once the command execution is completed, it will create a new directory called
build/production/NameofTheApp
. As our application namespace isPackt
, it creates the directorybuild/production/Packt
, as follows:What this command does is get all the code we developed (inside the
app
folder) plus the Ext JS code we really need to run the application and put it inside theall-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...