[ALOY-79] Widgets need to bundle assets and libraries
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2012-07-26T10:39:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2012 Sprint 15, Release 3.0.0 |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2012-06-27T11:46:11.000+0000 |
Updated | 2018-03-07T22:25:47.000+0000 |
Description
Description
Right now at compile time, a widget's view and controller are used to create a component commonjs module that gets put into Resources/alloy/widgets/WIDGETID/components
. That component commonjs module can be used to create self-contained instances of the widget in alloy-driven apps.
We also need to add Resources/alloy/widgets/WIDGETID/assets
and Resources/alloy/widgets/WIDGETID/lib
directories to allow these types of resources to be accessible at runtime as well.
Potential issues
* How do we handle paths to these assets? If they are going to be moved to a widget-specific directory, which should be done to avoid collisions, how will we handle file, image, etc... paths inside the widget code and styles?
Comments
JSON Source
Assets are now bundled. Still need to handle bundling of libraries.
Both libraries and other widgets need to be usable from a containing widget.If needed we can add a separate task for including widgets if there is big difference from libraries.
libraries need to be separated off just like assets. The libraries bundled with a widget should only be accessible by the widget. It shouldn't be a big task, just requires some organizational effort as the assets did. Widgets being used by other widgets relies more on the issues I linked than it does this one. It's widget dependency management that will allow us to do that effectively.
widgets also now bundle resources