Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to package (minify) an extjs 4 application

I am looking for de facto instructions for packaging and minfying an Ext JS 4 app.

Everything seems to point to the Sencha SDK, but everything around this is targeted at Sencha Touch, and anyway, when I follow the instructions (sencha app build testing) I receive:

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

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

I'd expect loads of posts/guides/blogs/articles on this what you'd think would be a common requirement given the shed load of .js files one creates whilst developing.

like image 584
jenson-button-event Avatar asked Jul 16 '12 08:07

jenson-button-event


2 Answers

I was able to get our application production ready with help from this article.

like image 167
Michael Dillon Avatar answered Sep 28 '22 01:09

Michael Dillon


This post is much out-dated. We need to be using Sencha Cmd.

  • http://docs.sencha.com/extjs/4.2.1/#!/guide/command
  • http://www.sencha.com/blog/all-new-sencha-cmd

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

A great thing once you've stepped over the short learning curve.

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

like image 31
jenson-button-event Avatar answered Sep 28 '22 02:09

jenson-button-event