a

Using JSBuilder to compress your Sencha Touch Apps

If you’re writing any sort of Sencha app, you must aggregate and minify the JavaScript using the JSBuilder utility. Unfortunately, the JSBuilder utility is cryptic.
You can download the JSBuilder here.
Once you get it installed, you need to build a jsb3 file. Don’t try to build the jsb3 file on your own. The easiest way to create the jsb3 file is to use the following JSBuilder sencha command.

1
sencha create jsb -a http://localhost:8080/YourPath/index.html -p C:YourPathindex_app.jsb3 -v

This command will generate a jsb3 file in the YourPath directory by munging the contents of your index.html.
Open up the jsb3 file. It will be json. You should see all of your javascript files plus the required ExtJs ones. Some of the dependencies in ExtJs are screwed up so if you’re bold you can remove the ones that don’t make any sense to make your payload smaller, e.g. Svg.js.
Every time you want to build a minified version of your ExtJs app, you’ll then want to then invoke the following bit of JSBuilder code to use your jsb3 file as the equivalent of a makefile, and spit out some compressed and obfuscated JavaScript.

1
sencha build -p C:YourPathindex_app.jsb3 -d C:YourPath -v

This will spit out a lovely all-classes.js and app-all.js. You will then want to place the app-all.js in your production directory.

Related Articles

3 Ways Gen AI and AWS can Enhance Your Business

3 Ways Gen AI and AWS can Enhance Your Business

Amazon is on the cutting edge of new technologies. They have been increasingly experimenting with AI and learning algorithms, culminating in their most recent breakthroughs in Generative AI. Developers and technology enthusiasts have access to their innovations through the tools available on AWS.

Business Owner’s Guide to DevOps Essentials

Business Owner’s Guide to DevOps Essentials

As a business owner, it’s essential to maximize workplace efficiency. DevOps is a methodology that unites various departments to achieve business goals swiftly. Maintaining a DevOps loop is essential for the health and upkeep of deployed applications.

AWS Graviton and Arm-architecture Processors

AWS Graviton and Arm-architecture Processors

AWS launched its new batch of Arm-based processors in 2018 with AWS Graviton. It is a series of server processors designed for Amazon EC2 virtual machines. The EC2 AI instances support web servers, caching fleets, distributed data centers, and containerized microservices. Arm architecture is gradually being rolled out to handle enterprise-grade utilities at scale. Graviton instances are popular for handling intense workloads in the cloud.