I'm developing some WebParts in a SharePoint 2016 project and I'm using a SharePoint Module to deploy some needed assets (js lib, images, ...) to the Style Library list and this is working fine.
Some libraries that I need are maintained via their NuGet Package, thus their files are located in a "Scripts" folder (bootstrap, jquery, ...).
Is it possible to change my SP Module to also target the files located in the "Scripts" folder?
I'm currently copypasting the files from the Scripts folder to my module but I'm sure there is a cleaner way to do it, I just can't find how... Relative path doesn't seem to work. Example:
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="MyProject.WebAssets" Url="Style Library"> <File Path="..\Scripts\bootstrap-datetimepicker.min.js" Url="js/boostrap-datatimepicker.min.js"/> </Module> </Elements>
Thanks in advance :)
EDIT: I finally found a solution that suits my needing, I've written this on my WordPress blog: http://lyyn.fr.nf/wp/2017/09/21/sharepoint-selective-deployment-of-nuget-packages-via-a-module/
To be short, I make a module called "Scripts", thus it creates a folder "Scripts" and NuGet will target it. Then, I just have to update the Elements.xml file. It works really better than what I thought.