Loading customer sapui5 library inside component.js
<p>According to the documentation here:</p>

<ul>
<li><a href="https://scn.sap.com/thread/3502503" rel="nofollow">https://scn.sap.com/thread/3502503</a></li>
<li><a href="http://jsbin.com/openui5-notepad-control-with-its-own-library-used-in-xmlview/1/edit?html,output" rel="nofollow">http://jsbin.com/openui5-notepad-control-with-its-own-library-used-in-xmlview/1/edit?html,output</a></li>
</ul>

<p>I build the following folder structure with following files:</p>

<ul>
<li>/my/themes/sap_bluecrystal/library.css</li>
<li>/my/library.js</li>
<li>/my/Square.js</li>
</ul>

<p>Now I am asking me how to load the library (inside Component.js) correct.
I tried following in Component.js</p>

<pre><code>jQuery.sap.registerModulePath("my", "./my");
</code></pre>

<p>And in some View:</p>

<pre><code>jQuery.sap.require("my.Square");
...
new my.Square({
 text : "Test",
 size : "200px"
})
</code></pre>

<p>All in all the Square control seems to be usable but the library.js and library.css is not loaded at all.</p>

<p>Any idea how to do it right?</p>

<p>Using bootstrap XML code inside index.html would not work if the app is running inside Fiori Launchpad.</p>

<p>Bonus question: Where to deploy a custom library inside SAP to be usable by multiple apps? One idea (but maybe that's wrong) is to create a BSP application just containing the library code? </p>