I’ve been working with SubtleGradient on a new Sugar that will allow easier creation of custom user actions using Javascript, and as part of our efforts we’ve come up with a new folder structure for custom actions and their associated files (which I’m also implementing in TEA). Basically, if users or third party Sugars need to package resources for use with custom actions they should use a folder named Support (in the root of the sugar or the ~/Library/Application Support/Espresso/ folder). The Support folder can have the following sub-folders:
Scripts
- the scripts that power TextActions or FileActions. Custom TEA actions in Python, shell scripts for use with the TEALoader, Javascripts executed by the upcoming Javascript loader, etc.
Library
- Supporting scripts. For example, functions and classes shared across multiple custom action scripts in the Support/Scripts folder.
Tools
- Binary files, etc. that are leveraged by items in Support/Scripts
Resources
- Text files, graphics, etc. needed by items in Support/Scripts or Support/Library
Tests
- Testing files or resources (if the Sugar or user needs them)
(and room for future expansion)
Anything obviously missing? Anyone have comments, thoughts, or suggestions?
