10 Feb 2013 12:22 PM #1
We would like to use closure compilation as a final step of validating our JS code. to avoid some trivial errors like extra coma in arrays/objects and some less trivial as well. Is it possible to tell sencha build to fail on certain closure warnings (by code?) also is it possible to provide options to closure compiler so we can control parsing to some extent? Same probably goes for Rhino or YUI
Also Cmd seems to be very un-extensible inside. I wanted to solve it by plugging in my own log handler which will analyze errors/warnings but no way, the whole thing is developed around singletons and static fields, makes assumptions everywhere (even main config file is loaded from where sencha.jar is only) and not modular at all. Also it seems to be not very friendly to be executed not under system class loader. I was trying to create maven plugin out of it (real plugin with sencha.jar and dependencies in maven not one executing local cmd install) and had a hell of a time doing it. Got it working but it's dirty. It is important to be able to have it packaged as maven plugin because using exact version of the tool is crucial to being sure your bug fix release is not going to fail due to updated version of the build tool
Another thing that my compressed version did not work. Dynamic loading in dev mode worked fine all files loading no warnings but compressed version still loaded few of classes dynamically because order of compression was not right. I resolved it by removing views: from controllers. But it does not give me much confedence in Cmd's dependency resolution but maybe I missed some rules, will re-read docs
12 Feb 2013 8:23 AM #2
- Join Date
- Mar 2007
- St. Louis, MO
- Vote Rating
I do not believe it will. If you are doing some automation then you could get the output and look for any specified warnings.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
12 Feb 2013 8:30 AM #3
I tried to do it by plugging in my own ConsoleHandler so I can intercept and analyze all log messages but Cmd seems to be so monolithic and un-configurable piece of code that it does not lend itself to any extensions. Its logging also seems to be very unfriendly to be executed under class loaders other than system (maven environment)
If someone in Cmd team is interested, I am willing to be a guinea pig to try few enhancements and maven plugin out of Cmd