For purposes of this document we will be using a JavaScript file that is found in the following folder in our project:
Right-clicking on our JavaScript file in the Visual Studio Solution Explorer window shows the following menu:
Pressing the 'Add JavaScript file to CRM' button invokes the following window:
Pressing the 'Next' button shows a page with all the web resources of the same type from the selected solution:
XrmToolkit will attempt to find the correct Web Resource for you. In our case it found and selected the web resource with a name of 'new_/Entities/AccountFormScripts.js'. Pressing the 'Next' button shows a page allowing you to change the different CRM properties of the web resource:
Pressing the 'Finish' button will link our local file with the web resource in CRM. It will also publish our local file to CRM overwriting the web resource in CRM.
To learn more about the different actions available to a file linked to CRM see the documentation here.