没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > mxmlcleaner |
mxmlcleaner
|
0 | 0 | 42 |
贡献者 | 讨论 | 代码提交 |
IntroductionThis project contains utilities for cleaning and organizing Adobe Flex mxml files. The utility performs a recursive edit on a user specified source folder.
The goal is to:
Remove unused imports
Organize the remaining imports in alphabetical order
Remove unused namespaces
Organize the namespaces (and remaining attributes)
From:
To:
DownloadsAn eclipse plugin - This only organises namesapces (flash builder 4 will organise your imports for you).
An Ant Task - This Task can be included in your automated build to keep your mxml clean
A ruby script - Same as the Ant task, but you need to have ruby.
ProjectThere are 2 basic projects: A ruby project and a java project.
The ruby project requires that you have ruby installed.
The java project is an Ant Task project. It works but you need to add JRuby to your Ant classpath to get it working.
Be sure to have a back up of your files before you execute the clean.
UsageAnt TaskThe easiest thing to do is do download the sample project and run it with Ant. example-project
Ruby ScriptTo run the cleaner do the following: Requirements: Ruby 1.8.5 or higher
1. Download the ruby project
2. cd to the lib folder
2. run: ruby main.rb ${the_path_to_a_folder_that_contains_mxml_files}
eg:
ruby main.rb C:\dev\my-project\src\main\flex
Flash BuilderCurrently Flex Builder or Flash Builder doesn't provide this functionality. If they do eventually provide it, it is unknown if it will allow you to execute it in batch mode.
Here are the related issues from bugs.adobe.com - be sure to vote!
Organise imports in FB: http://bugs.adobe.com/jira/browse/FB-5562
Organise namespaces in FB: todo - ed to add
TODOsee: AboutNamespaceAndAttributeOrganizing
I still need to refactor code to allow a custom sort rule to be supplied to the script/Ant Task.