Version 0.3.0 of the Titanium Code Processor has been released! The big new feature that warranted the minor version bump is a re-worked CLI with lots of new features
New Features
- Reworked the CLI interface to be much more robust
- The code processor now takes a sub-command, one of 'options', 'plugins', 'analyze', and 'subprocess'
- The 'subprocess' sub-command provides an interactive, structured mechanism for calling the code processor from other programs
- Plugins can now take options
- Options must be specified using a configuration file
- Plugins can now reside anywhere
- To specify plugins in another location, they must be specified in a configuration file
- The ti-api-processor plugin now allows you to specify values for any primitive type in the API
- This can be used to see how an app will react to, say, a specific screen size
- Plugins are now checked to make sure their dependencies are also loaded
- Added --all-plugins and --non-ti-plugins flags to the CLI to load all plugins or all non-Titanium-specific plugins, respectively
- Now, if no plugins are specified, no plugins are loaded
Bug Fixes
- Fixed a bug where the code processor crashes when encountering a reference to an undeclared variable that is named the same as an Object prototype property
- Added a lot of configuration validation to prevent unexpected behavior/crashes when supplied with bad configuration data
The primary impetus with these new features was to add a new interface for studio to interact with. As part of this process, probably the biggest thing I added was support for reading options from a config file. This config file, detailed in the project README, allows for greater control over options than is possible from the command line. Another advantage to using a config file is that the "titanium" CLI command is no longer used, which shaves about 2 seconds off the startup time and allows people without the Titanium CLI installed to use the code processor.