I recently went though the same issue, it's not perfect but this should get you started. Hopefully you, or some people could offer some improvements. I kind of settled with "good enough" for the moment. The idea is to exclude everything that isn't your app:
sencha compile page -name=page -in index.html -out ../dontuse.html and restore page and exclude -all and include -namespace MyApp and include -file "app/ux/**" and concat ../all-classes.js
- first I tried to just exclude the Ext namespace, but it turns out the framework also includes about 9k lines of code that doesn't fall into the Ext ns. So I ended up with a "exclude all, then add back in what i need" mindset.
- dontuse.html is because the output html assumes the extjs framework is minified with your code and isn't. You will need to make/maintain another html file that includes the framework before the rest of the includes.
- MyApp is the namespace of your application, it equates to something like Ext.create('MyApp.model.User').
- I have custom overrides and plugins in my app/ux folder that doesn't belong in my app's namespace so I need to include them.
- Finally: I never got this to include my app.js. I gave up and just include that (uncompressed) in my custom index.html .