Usually, when you do a , this takes care of removing the diagnostics due to dependency resolution.
If you do a compile from outside of that, you can manually enable the dependency resolution like so:
Where app.js is the starting point, and the recursive switch tells compile to transitively load the dependencies based off of your starting point. If your app doesn't require the diagnostics then the diagnostics will be excluded from the result set.
sencha compile -classpath=my\path,another\path,metoo,and\another exclude -all and include -recursive -file=app.js and concatenate -yui filename.js
If that doesn't work, you can manually exclude the diagnostics by:
sencha compile -classpath=my\path,another\path,metoo,and\another exclude --file=diag and concatenate -yui filename.js