- Create a full-trust or sandbox solution in Visual Studio.
- Create a module element in Visual Studio to deploy a bootstap JavaScript file
- Create a custom action element to inject the link to the bootstrap JavaScript file
- Create a Feature that includes the two elements
- In your bootstrap Javascript file, inject any additional dynamic links (see below)
- Deploy your solutons and activate your feature
Now that you have your bootstrap JavaScript file injected, you can just edit the JavaScript file to modify which additional scripts and CSS are dynamically loaded.
There are a lot of blogs on how to inject dynamic JavaScript and CSS links into a page. here is a hyperlink to one: How To Dynamically Insert JavaScript and CSS
Here are examples of elements
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Boostrap.Module" Url="Style Library" RootWebOnly="True">
<File Path="Bootstrap.Module\bootstrap.js" Url="Bootstrap/bootstrap.js" />
</Module>
</Elements>
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Location="ScriptLink"
ScriptSrc="~SiteCollection/Style Library/Boostrap/bootstrap.js"
Sequence="100">
</CustomAction>
</Elements>