View Full Version : How to exclude classes during build

24 Nov 2013, 4:02 PM
Is it possible to exclude some namespaces/classes from final app.js during build and load this classes dynamically on demand?

For example:

i have two classes:
- test.view.First -> app/view/First.js;
- test.view.Second -> app/view/Second.js;

I need, that app/view/First.js will be concatenated with all other js files, but app/view/Second.js still remains as separated js file for on-demand loading and copied to somewhere in build directory automatically.

Is it possible at all now?

25 Nov 2013, 8:26 AM
http://docs.sencha.com/extjs/4.2.2/#!/guide/command_compiler read the section called 'Conditional Compilation'

foo: function () {
if (sometest) {
Ext.log.warn("Something is wrong...");


25 Nov 2013, 8:43 AM
The "conditional compilation" feature of Sencha Cmd is useful, but it's usually intended for small portions of code, rather than entire files. To exclude specific files from the build entirely, take a look at this thread (http://www.sencha.com/forum/showthread.php?264146-How-to-exclude-a-file-from-sencha-app-build&p=968669&viewfull=1#post968669). In short, you can modify the Sencha Cmd build.operations property to exclude the files you don't need.

26 Nov 2013, 4:25 AM
Is there is a way to specify exclude options in sencha app build command params instead of modifying build.xml?

Is it possible to instruct ant to copy all excluded classes into app directory in production folder?