View Full Version : Extapp tool to build ExtJS applications

20 Jun 2014, 7:04 AM
Extapp is the lightweight tool to build ExtJS applications. The main goal is to collect all dependencies required by JS application into one production-ready output file.

The tool is processing build in non-conflict manner. It may alert developer about errors and warnings but mainly it does not break the build because for example of duplicates or some class file was not found etc.

No additional comment conventions needed. Extapp avoids some custom magic comments like /*requires file.js */. It uses native ExtJS dependencies declarations in Ext.define() method or in any other place in the code.

The main features of the Extapp tool:

resolving dependencies
deduplicate referenced dependencies
ranking classes based on references
smart avoid of infinite loops
build sources into one output file
usage in other JS frameworks

java -jar extapp-yyyy.mm.jar [options] [config file] [source file] [output file]

Extapp VS Sencha.cmd

Sencha.cmd is the ultimate tool to work with ExtJS applications. Extapp is about something different. It is probably more like the alternative of JS Compiler module built in Sencha.cmd.

excluding native 'Ext' sources
working in non-conflict way
deployment friendly
Excluding native 'Ext' sources

The big ExtJS applications usually use many of core ExtJS sources. That is why it is useful just to include 'ext-all.js' and do not care about native 'Ext' classes. Extapp does the job. You may exclude 'Ext' class but include 'Ext.data' etc.

Working in non-conflict way

We do not want the dictatorship of the tools. Class was not found ? - OK. Go ahead. Duplicates? - Nevermind. Output file was not set? - Let's backup the source file and use it instead!

Deployment friendly

It is much more easy to integrate one simple jar file into deployment environments than install and manage huge tools.
[B]Usage of app build and sources at the same time. This way may help to not fail the production builds. The website can work with build file and know paths to source files. That is why the app can load source files when needed if they don't exist or were misplaced in the build file.
Extapp may be easily integrated in both ant and gradle deployment scripts.

More information: https://github.com/liberborn/extapp

Please comment and contribute.

20 Jun 2014, 8:14 AM
Very interesting project. Seems like you put a lot of thought into this.


20 Jun 2014, 2:50 PM
Thanks Scott.

I was trying to improve deployment process on my ExtJS projects I'm working on.

Previously I was using Nicholas Zakas's Combiner and similar tools. But I was tired to manually handle files dependencies via tricky comments conventions. It is very unuseful to indicate dependencies in comments while ExtJS classes declare themselves all dependencies they need. It was double effort.

Also combiner and other tools were not collecting dependencies correctly on long and complex dependency chains. That caused a big waste of time on finding correct dependencies declarations and could not assume any reasonable rules on that.

So these above were main reasons to spend some time and develop yet another JS Compiler tool which meets my needs. And I'm happy to share it with ExtJS Community.