How to pack (reduce) an extjs 4 application

I am looking for de facto instructions for packaging and using the Ext JS 4 application.

Everything seems to point to the Sencha SDK, but everything around it is focused on the Sencha Touch, and anyway, when I follow the instructions ( sencha app build testing ), I get:

"The current working directory (C: ...) is not a recognized Sencha SDK or application folder"

Which throws me away since the structure I use was created by Sencha Architect. Looking at the docs here , the folder structure created by the architect is correct, but some file names are different. And there seem to be some packaging files (app.json packager.json) that I have no idea about.

I would expect a post / guide / blog / article to be downloaded about this, which, in your opinion, would be a general requirement, given the loading of the .js files that are created during development.

+6
source share
3 answers

This post is very outdated. We need to use Sencha Cmd .

Download: http://www.sencha.com/products/sencha-cmd/download

Great thing when you switched to a short learning curve.

Its as simple as running the sencha app build , which creates compressed javascript and YUI style files, with clever processing to ensure only what the application needs is further reducing the size.

+4
source

I was able to prepare our application using this article .

+4
source

I was not happy to use Sencha.Cmd. It is huge, hard to configure, usually interrupts trivial errors.

I also tried to use Nicholas Zakas JS Combiner , but I always had to track the dependencies and write them accurately in the comments. Although ExtJS classes are often messed up in the build output file.

Then I decided to write an easy build tool for ExtJS applications myself. There he is:

Extapp - https://github.com/liberborn/extapp .

No need to add additional comments. He "understands" the definitions of ext. The default configuration file is enough to rely on all types of dependencies that ExtJS uses.

Please feel free to use.

 Usage: java -jar extapp-yyyy.mm.jar [options] [base path] [config file] [source file] [output file] 

It can be included in both ant and gradle scripts.

The Extapp tool also works with ExtJS 5. It probably works with Sencha Touch, but I did not have the opportunity to test it.

+2
source

Source: https://habr.com/ru/post/920563/


All Articles