2

I guess here is not the best place to ask, but I can't find or get help anywhere else.

How can I tell sencha cmd to stop obfuscate my files?

I have third party library Strophejs and there is somethink like:

var Strophe;

ofcource after sencha app build I'm getting something like

var g;

how to fix this or how to stop obfuscating on this file or at least don't obfuscate Strophe variable name?

documentation saying that obfuscate is enabled by default when building for production and doesn't say how to disable it. It causes only pain.

Vytautas
  • 3,509
  • 1
  • 27
  • 43

1 Answers1

1

Take a look at the Sencha Touch API docs: - http://docs.sencha.com/touch/2.2.1/#!/guide/command_app

Scroll to the "Deploying Your Application", about 1/2 way down.

You'll see a full explanation of the sencha app build commands.

arthurakay
  • 5,631
  • 8
  • 37
  • 62
  • 1
    Note: they're the same for Ext JS and Touch. – arthurakay Jul 01 '13 at 21:07
  • ok I can see only two way to build app first one `sencha app build testing` wich works fine just without any minification and second `sencha app build production` with does minification and my problem still exists. maybe I'am missing something how can I say don't touch that file it is minimised or something what would help from changing the `var Strophe` name. – Vytautas Jul 01 '13 at 21:52
  • or maybe there is a way to change definition of strophe in some way that compiler would understand that the name is important and wouldn't touch it? – Vytautas Jul 01 '13 at 21:53
  • Is there any solution found? – alsid Aug 20 '13 at 09:29
  • Only managed to on/off compiling while setting properties in production.properties file. For instance, setting build.compression.yui=0 will prevent compilation and minification by YUI compiler. – alsid Aug 20 '13 at 10:18
  • In your app.json file, you can define arbitrary JS dependencies which need to be loaded. These files can be marked as "bundle" : true for optional inclusion in the concatenated file. In either case they won't be further minified/obfuscated. – arthurakay Aug 20 '13 at 13:23
  • That's not right? bundle states which file all of the other files should be bundled into? The app.json file I got when creating my app contains this comment: "bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */ – oldwizard May 15 '14 at 13:16
  • The comment is misleading. The "bundle" file is "app.js" by default, and you can mark as many JS files as "bundle" as you want. Anything not marked with "bundle" is not compiled into the larger file. – arthurakay May 15 '14 at 14:51