Closed saschakiefer closed 10 years ago
We only want to use sap.ui.localResources( "myDir" );
on a classic app. For the Fiori-like apps that use the component model we use the UI5 bootstrap tag to specify resource roots instead.
So we need to detect what sort of app the new component is being generated in. If its classical then use this.addLocalResource(this.componentName);
; if its fiori-like then skip this and ....
a) Do we need to add a new resource root? We don't if we are going to prefix the component name with the apps namespace as it already has that resource root defined.
b) If we don't prefix the component name with the apps namespace then we would need to add the component name as a resource root. (the above two options depend on issue #47.)
Even though the generator checks for Application.js or Component.js, I still want to add a check if the heystack is found.
When the component controller doesn't find the comment
/* endOfResources */
in index.html, it addssap.ui.localResources( "myDir" );
at the beginning of index.html. if the hook isn't found, the generator should do nothing.