A Sitecore solution is often deployed by installing packages that are build by TDS. A lot of information can be found about different options to include files in a TDS package as long as the files are included in the Visual Studio solution. However there are many valid reasons to exclude files from a solution, for example CSS or JavaScript files which are build by gulp or webpack. In these scenarios it is often better to keep these files outside Visual Studio so developers update the source files and do not accidentally update the build artifacts.
TDS File Replacements
File replacements is an often overlooked feature of TDS but they are powerful for including files build by external tools which you do not want to include in Visual Studio or source control. Below screenshot shows how to include all files that are in the /dist/scripts/mysite folder. Notice that both the source and target location are relative paths. This ensures the source and target location always point to the correct path, even if the solution gets build in a different path, for example on the build server.